diff --git a/README.md b/README.md index 770bbae..7e7ba75 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ A temporary home for CAPK +# Manager Container Image + +A sample is built and hosted at `gcr.io/kubernetes1-226021/capk-manager:latest` + ## Building the binaries Requires go 1.12? Probably less strict than that. @@ -17,3 +21,32 @@ Requires a google cloud project `./scripts/publish-capk-manager.sh` +# Running the capk manager + +⚠️Only tested on linux⚠️ + +Start a management kind cluster + +`capkctl setup` + +Set up your `kubectl` + +`export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"` + +Install the cluster-api CRDs + +`capkctl crds | kubectl apply -f -` + +Run the capk & capi manager + +`capkctl capk | kubectl apply -f -` + +## Create a worker cluster + +`kubectl apply -f examples/simple-cluster.yaml` + +### Interact with a worker cluster + +You will find the kubeconfigs in /kubeconfigs on the host. In this case: + +`export KUBECONFIG=/kubeconfigs/kind-config-my-cluster` diff --git a/examples/simple-cluster.yaml b/examples/simple-cluster.yaml new file mode 100644 index 0000000..848fa38 --- /dev/null +++ b/examples/simple-cluster.yaml @@ -0,0 +1,34 @@ +apiVersion: "cluster.k8s.io/v1alpha1" +kind: Cluster +metadata: + name: my-cluster +spec: + clusterNetwork: + services: + cidrBlocks: ["10.96.0.0/12"] + pods: + cidrBlocks: ["192.168.0.0/16"] + serviceDomain: "cluster.local" +--- +apiVersion: "cluster.k8s.io/v1alpha1" +kind: Machine +metadata: + name: my-control-plane + labels: + cluster.k8s.io/cluster-name: my-cluster + annotations: + set: "control-plane" +spec: + providerSpec: {} +--- +apiVersion: "cluster.k8s.io/v1alpha1" +kind: Machine +metadata: + name: worker + labels: + cluster.k8s.io/cluster-name: my-cluster + annotations: + set: "worker" + name: "my-cluster-worker" +spec: + providerSpec: {}