April 2018
Intermediate to advanced
468 pages
14h 34m
English
To register a cluster with the federation, we need a secret to talk to the cluster. Let's create the secret in the host Kubernetes cluster. Suppose kubeconfig of the target cluster is at |cluster-1|kubeconfig. You can run the following command to create the secret:
> kubectl create secret generic cluster-1 --namespace=federation --from-file=/cluster-1/kubeconfig
The configuration for the cluster looks the same as this:
apiVersion: federation/v1beta1
kind: Cluster
metadata:
name: cluster1
spec:
serverAddressByClientCIDRs:
- clientCIDR: <client-cidr>
serverAddress: <apiserver-address>
secretRef:
name: <secret-name>
We need to set <client-cidr>, <apiserver-address>, and <secret-name>.
Read now
Unlock full access