Skip to content
This repository was archived by the owner on Apr 25, 2023. It is now read-only.

Commit ae7f9eb

Browse files
authored
Merge pull request #1280 from makkes/add-quickstart
chore: Add quickstart guide
2 parents 9f45a5a + 5eabbf1 commit ae7f9eb

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

README.md

+46
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,52 @@ higher-level APIs:
6363

6464
## Guides
6565

66+
### Quickstart
67+
68+
1. Clone this repo:
69+
```
70+
git clone https://github.com/kubernetes-sigs/kubefed.git
71+
```
72+
1. Start a [kind](https://kind.sigs.k8s.io/) cluster:
73+
```
74+
kind create cluster
75+
```
76+
1. Deploy kubefed:
77+
```
78+
make deploy.kind
79+
```
80+
81+
You now have a Kubernetes cluster with kubefed up and running. The cluster has been joined to itself and you can test federation of resources like this:
82+
83+
1. Verify the `KubeFedCluster` exists and is ready:
84+
```
85+
kubectl -n kube-federation-system get kubefedcluster
86+
```
87+
**If you're on macOS** the cluster will not immediately show as ready. You need to [change the API endpoint's URL first](https://github.com/kubernetes-sigs/kubefed/blob/master/docs/cluster-registration.md#joining-kind-clusters-on-macos):
88+
```
89+
./scripts/fix-joined-kind-clusters.sh
90+
```
91+
1. Create a namespace to be federated:
92+
```
93+
kubectl create ns federate-me
94+
```
95+
1. Tell kubefed to federate that namespace (and the resources in it):
96+
```
97+
./bin/kubefedctl federate ns federate-me
98+
```
99+
1. Create a `ConfigMap` to be federated:
100+
```
101+
kubectl -n federate-me create cm my-cm
102+
```
103+
1. Tell kubefed to federate that `ConfigMap`:
104+
```
105+
./bin/kubefedctl -n federate-me federate configmap my-cm
106+
```
107+
1. Verify the `FederatedConfigMap` has been created and propagates properly:
108+
```
109+
kubectl -n federate-me describe federatedconfigmap my-cm
110+
```
111+
66112
### User Guide
67113

68114
Take a look at our [user guide](docs/userguide.md) if you are interested in

0 commit comments

Comments
 (0)