Skip to content

Commit 8aea6f7

Browse files
authored
readme: add docs (#34)
1 parent 198840f commit 8aea6f7

File tree

1 file changed

+69
-2
lines changed

1 file changed

+69
-2
lines changed

README.md

+69-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,61 @@ Inspired by `kubectl` and
1717
[ClusterAPI's](https://github.com/kubernetes-sigs/cluster-api) `clusterctl`, you
1818
declare your local cluster with YAML and use `ctlptl` to set it up.
1919

20+
## How do I install it?
21+
22+
### Homebrew (Mac/Linux)
23+
24+
```
25+
brew install tilt-dev/tap/ctlptl
26+
```
27+
28+
### Scoop (Windows)
29+
30+
```
31+
scoop bucket add tilt-dev https://github.com/tilt-dev/scoop-bucket
32+
scoop install ctlptl
33+
```
34+
35+
## How do I use it?
36+
37+
`ctlptl` supports 3 major commands:
38+
39+
- `ctlptl apply -f cluster.yaml` - ensure a cluster exists, or create one
40+
- `ctlptl delete -f cluster.yaml` - delete a cluster and its state
41+
- `ctlptl get` - see all running clusters
42+
43+
### Examples
44+
45+
Turn on Kubernetes in Docker for Mac and make sure it has at least 4 CPU:
46+
47+
```
48+
cat <<EOF | ctlptl apply -f -
49+
apiVersion: ctlptl.dev/v1alpha1
50+
kind: Cluster
51+
product: docker-desktop
52+
minCPUs: 4
53+
EOF
54+
```
55+
56+
Reset and shutdown the Kubernetes cluster in Docker for Mac:
57+
58+
```
59+
ctlptl delete cluster docker-desktop
60+
```
61+
62+
Create a KIND cluster with a built-in registry:
63+
64+
```
65+
cat <<EOF | ctlptl apply -f -
66+
apiVersion: ctlptl.dev/v1alpha1
67+
kind: Cluster
68+
product: kind
69+
registry: kind-registry
70+
EOF
71+
```
72+
73+
You can see more example configurations under [./examples](./examples).
74+
2075
## Why did you make this?
2176

2277
At [Tilt](https://tilt.dev/), we want to make Kubernetes a nice environment for local dev.
@@ -31,9 +86,21 @@ cluster](https://docs.tilt.dev/choosing_clusters.html) and example repos like
3186

3287
`ctlptl` is a culmination of what we've learned.
3388

34-
## How do I try it?
89+
## Features
90+
91+
### Current
92+
93+
- Docker for Mac
94+
- [KIND](https://kind.sigs.k8s.io/)
95+
- [KIND with a registry](https://kind.sigs.k8s.io/docs/user/local-registry/)
96+
- Allocating CPUs
97+
98+
### In progress
3599

36-
We're still writing it! Stay tuned.
100+
- Minikube
101+
- K3D
102+
- Microk8s
103+
- Allocating Memory
37104

38105
## Community
39106

0 commit comments

Comments
 (0)