How To Launch Kubernetes Federation on Google Cloud Platform

How To Launch Kubernetes Federation on Google Cloud Platform

In this edition of our Google Cloud Platform consulting series, we’ll take you through a step-by-step to launching Kubernetes Federation on Google Cloud Platform.

What is Kubernetes Federation? It allows you to combine several Kubernetes clusters and manage them through one Control Plane. With Federation, we’re able to synchronize resources in all clusters, reduce response time for queries from different parts of the world, and achieve high availability, as we place the clusters on different continents.

In our example, we will be using Google Kubernetes Engine.

DNS

Creating zone:

Checking:

 

Output:

Clusters

Creating a cluster in Asia:

Output:

Getting the connection credentials:

Output:

Defining user policy:

Output:

Creating a cluster in Europe:

Getting the connection credentials:

Defining user policy:

Creating a cluster in USA:

Getting the connection credentials:

Defining user policy:

Let’s do the same thing again for two more clusters in Europe and Asia:

Checking after all the actions are completed:

Output:

Or in GCP console:

Federation

Federation Control Plane manages the state of all your clusters. The control panel can be placed inside one of your Kubernetes clusters.

Even if the Control Plane cluster does not work, the other clusters are independent, so they will continue to function until the control panel goes back online. You can manage clusters separately! This means that you do not need to worry about one point of failure.

Now let’s see what contexts are used:

Output:

Kubernetes Federation uses the context name to create the Federation, but it must conform to the RFC1123 specification. It means that you need to rename the context. You can do this with the following commands: