A sample is built and hosted at gcr.io/kubernetes1-226021/manager:latest
go, 1.12+
kubectl
docker
Building Go binaries requires go 1.12+
for go module support.
# required if `cluster-api-provider-docker` was cloned into $GOPATH
export GO111MODULE=on
# build the binaries into ${PWD}/bin
./script/build-binaries.sh
Make sure gcloud
is authenticated and configured.
You also need to set up a google cloud project.
Run: ./scripts/publish-manager.sh
Alternatively, to publish the manager container image to your pre-existing custom container registry, run:
REGISTRY=<MY_REGISTRY> ./scripts/publish-manager.sh
NOTE: You should have run docker login
to login to your custom container registry.
Tested on: Linux, works ok on OS X sometimes
Make sure you have kubectl
.
-
Install capdctl:
go install ./cmd/capdctl
-
Start a management kind cluster
capdctl setup
-
Set up your
kubectl
export KUBECONFIG="${HOME}/.kube/kind-config-management"
kubectl apply -f examples/simple-cluster.yaml
The kubeconfig is on the management cluster in secrets. Grab it and write it to a file:
kubectl get secrets -o jsonpath='{.data.value}' my-cluster-kubeconfig | base64 --decode > ~/.kube/kind-config-my-cluster
Look at the pods in your new worker cluster:
kubectl get po --all-namespaces --kubeconfig ~/.kube/kind-config-my-cluster