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

Commit 61954bd

Browse files
committed
Adds examples and readme
Signed-off-by: Chuck Ha <[email protected]>
1 parent 279fded commit 61954bd

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
A temporary home for CAPK
44

5+
# Manager Container Image
6+
7+
A sample is built and hosted at `gcr.io/kubernetes1-226021/capk-manager:latest`
8+
59
## Building the binaries
610

711
Requires go 1.12? Probably less strict than that.
@@ -17,3 +21,32 @@ Requires a google cloud project
1721

1822
`./scripts/publish-capk-manager.sh`
1923

24+
# Running the capk manager
25+
26+
⚠️Only tested on linux⚠️
27+
28+
Start a management kind cluster
29+
30+
`capkctl setup`
31+
32+
Set up your `kubectl`
33+
34+
`export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"`
35+
36+
Install the cluster-api CRDs
37+
38+
`capkctl crds | kubectl apply -f -`
39+
40+
Run the capk & capi manager
41+
42+
`capkctl capk | kubectl apply -f -`
43+
44+
## Create a worker cluster
45+
46+
`kubectl apply -f examples/simple-cluster.yaml`
47+
48+
### Interact with a worker cluster
49+
50+
You will find the kubeconfigs in /kubeconfigs on the host. In this case:
51+
52+
`export KUBECONFIG=/kubeconfigs/kind-config-my-cluster`

examples/simple-cluster.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
apiVersion: "cluster.k8s.io/v1alpha1"
2+
kind: Cluster
3+
metadata:
4+
name: my-cluster
5+
spec:
6+
clusterNetwork:
7+
services:
8+
cidrBlocks: ["10.96.0.0/12"]
9+
pods:
10+
cidrBlocks: ["192.168.0.0/16"]
11+
serviceDomain: "cluster.local"
12+
---
13+
apiVersion: "cluster.k8s.io/v1alpha1"
14+
kind: Machine
15+
metadata:
16+
name: my-control-plane
17+
labels:
18+
cluster.k8s.io/cluster-name: my-cluster
19+
annotations:
20+
set: "control-plane"
21+
spec:
22+
providerSpec: {}
23+
---
24+
apiVersion: "cluster.k8s.io/v1alpha1"
25+
kind: Machine
26+
metadata:
27+
name: worker
28+
labels:
29+
cluster.k8s.io/cluster-name: my-cluster
30+
annotations:
31+
set: "worker"
32+
name: "my-cluster-worker"
33+
spec:
34+
providerSpec: {}

0 commit comments

Comments
 (0)