10. Setting up cluster federation with Kubefed
Kubefed is a command line tool to help administrate federated clusters
Host cluster: kubefed init is the command to deploy the components of the federated control plane on a
given Kubernetes cluster.
DNS provider: currently GKE and AWS supported, automatically populates DNS with federated services
10
$ kubefed init federation --host-cluster-context=gke --dns-zone-name="galwaycit.eu.org." --dns-
provider="google-clouddns"
Creating a namespace federation-system for federation system components... done
Creating federation control plane service............... done
Creating federation control plane objects (credentials, persistent volume claim)... done
Creating federation component deployments... done
Updating kubeconfig... done
Waiting for federation control plane to come up................. done
Federation API server is running at: 35.200.105.198
11. Joining clusters to the federation - kubefed join
11
$ kubefed --context=federation join japan --cluster-context=gkejpn --host-cluster-context=gkejpn
cluster "japan" created
$ kubefed --context=federation join uk --cluster-context=azuk --host-cluster-context=gkejpn
cluster "uk" created
$ kubefed --context=federation join us --cluster-context=azus --host-cluster-context=gkejpn
cluster "us" created
$ kubectl config use-context federation
Switched to context "federation".
…
$ kubectl get cluster
NAME STATUS AGE
japan Ready 1m
uk Ready 42s
us Unknown 28s
…
$ kubectl get cluster
NAME STATUS AGE
japan Ready 1m
uk Ready 52s
us Ready 38s
22. Questions?
Thank you.
Cynthia Lopes do Sacramento: cynthia.sacramento@hpe.com
Miguel Castilho Dias: miguel.castilho-dias@hpe.com
November 2017
Notas do Editor
So what is kubernetes, exactly? It is an open-source system for automating deployment, scaling, and management of containerized applications.
- With its great API and features like Self-Healing, AutoScaling, Rollout Control, Resource Management, Built-in Service discovery and more;
Kubernetes has gained a lot of popularity with more and more companies adopting it. For example the likes of ebay, Philips, SAP, Pokemon Go and others are stated in their official website as Kubernetes users.
Also, Kubernetes runs anywhere. It can be deployed on virtual machines or bare metal servers running in the public cloud, or on premises. Because of this, Kubernetes on its own is a great tool for inter-operability.
So let’s have a look at the kubernetes architecture.