Skip to content
A Cluster API Provider implementation using docker containers as the infra provider. Cluster API locally for a change!
Go Shell Makefile Dockerfile HCL
Branch: master
Clone or download
Latest commit bc6d722 Aug 22, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Add capdctl, capd-manager versions to bug report template Aug 9, 2019
api/v1alpha2 Add storage version to api tyupes Aug 21, 2019
cloudinit cloudinit adapter clean up Aug 21, 2019
cmd/manager remove unused source code and scripts Aug 22, 2019
config Fix up kustomize for v3.1 Aug 22, 2019
controllers address feedback Aug 22, 2019
docker address feedback Aug 22, 2019
docs docs: Create a compatible kind cluster, and troubleshoot an incompati… Aug 9, 2019
examples Fix to broken simple-cluster Aug 13, 2019
hack Use patch helper from cluster-api Aug 20, 2019
scripts remove unused source code and scripts Aug 22, 2019
third_party/forked Make container restartable in non-docker runtime Aug 6, 2019
.gitignore Use patch helper from cluster-api Aug 20, 2019
CONTRIBUTING.md Add CONTRIBUTING.md file Jun 25, 2019
Dockerfile production ready dockerfile Aug 21, 2019
Dockerfile.dev production ready dockerfile Aug 21, 2019
LICENSE hack: include a verify-whitespace script and fix whitespace issues Jun 24, 2019
Makefile Pin controller-gen version Aug 6, 2019
OWNERS hack: include a verify-whitespace script and fix whitespace issues Jun 24, 2019
OWNERS_ALIASES Add detiber as project admin Aug 20, 2019
PROJECT modify DockerMachie Api version to v1alpha2 Aug 1, 2019
README.md Fixes a tiny typo in the build instructions Aug 13, 2019
SECURITY_CONTACTS hack: include a verify-whitespace script and fix whitespace issues Jun 24, 2019
code-of-conduct.md hack: include a verify-whitespace script and fix whitespace issues Jun 24, 2019
go.mod refactor machine controller Aug 22, 2019
go.sum refactor machine controller Aug 22, 2019

README.md

Cluster API Provider Docker

Manager Container Image

A sample is built and hosted at gcr.io/kubernetes1-226021/manager:latest

External Dependencies

  • go, 1.12+
  • kubectl
  • docker

Building Go binaries

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
./scripts/build-binaries.sh

Building the image

Using Gcloud

Make sure gcloud is authenticated and configured.

You also need to set up a google cloud project.

Run: ./scripts/publish-manager.sh

Using Docker

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.

Trying CAPD

Tested on: Linux, works ok on OS X sometimes

Make sure you have kubectl.

  1. Install capdctl:

    go install ./cmd/capdctl

  2. Start a management kind cluster

    capdctl setup

  3. Set up your kubectl

    export KUBECONFIG="${HOME}/.kube/kind-config-management"

Create a worker cluster

kubectl apply -f examples/simple-cluster.yaml

Interact with a worker cluster

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

You can’t perform that action at this time.