Initializing the federation control plane

Now that we have two clusters, let's set up the federation control plane in the GCE cluster. First, we'll need to make sure that we are in the GCE context, and then we will initialize the federation control plane:

$ kubectl config use-context gcek8s
$ kubefed init master-control --host-cluster-context=gcek8s --dns-zone-name="mydomain.com"

The preceding command creates a new context just for federation called master-control. It uses the gcek8s cluster/context to host the federation components (such as API server and controller). It assumes GCE DNS as the federation's DNS service. You'll need to update dns-zone-name with a domain suffix you manage.

By default, the DNS provider is GCE. You can use --dns-provider="aws-route53" to set it to AWS route53; however, out of the box implementation still has issues for many users.

If we check our contexts once again, we will now see three contexts:

$ kubectl config get-contexts

The preceding command should produce something like the following:

Let's make sure we have all of the federation components running before we proceed. The federation control plane uses the federation-system namespace. Use the kubectl get pods command with the namespace specified to monitor the progress. Once you see two API server pods and one controller pod, you should be set:

$ kubectl get pods --namespace=federation-system

Now that we have the federation components set up and running, let's switch to that context for the next steps:

$ kubectl config use-context master-control
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.36.72