Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

Commit

Permalink
Adds examples and readme
Browse files Browse the repository at this point in the history
Signed-off-by: Chuck Ha <[email protected]>
  • Loading branch information
chuckha committed Jun 10, 2019
1 parent 279fded commit 61954bd
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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`
34 changes: 34 additions & 0 deletions examples/simple-cluster.yaml
Original file line number Diff line number Diff line change
@@ -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: {}

0 comments on commit 61954bd

Please sign in to comment.