We finally come to the section of the book that we have been waiting for, that is, to make these two isolated Kubernetes clusters communicate and work with each other. This is done using a feature called the KubeFed.
The following link talks about cluster federation in detail: https://kubernetes.io/docs/tasks/federation/set-up-cluster-federation-kubefed/
At the time of writing, Kubefed is beta and is only used by companies that are running cutting edge technology. In this, we create a new Kubernetes cluster, which is specifically used to federate the other Kubernetes clusters and not host the pods themselves.
The Federated service (the service in the federated cluster) is much like a normal k8s service but it performs the following functions:
- Deploys the same Kubernetes services in every underlying cluster that is joined to the cluster federation.
- Monitors the health of those services.
- Manages DNS records in a public DNS provider (such as Google Cloud DNS, AWS Route...