Concepts

Detailed explanations of Kubernetes system concepts and abstractions.

Edit This Page

Federation

This guide explains why and how to manage multiple Kubernetes clusters using federation.

Why federation

Federation makes it easy to manage multiple clusters. It does so by providing 2 major building blocks:

Some other use cases that federation enables are:

Federation is not helpful unless you have multiple clusters. Some of the reasons why you might want multiple clusters are:

Caveats

While there are a lot of attractive use cases for federation, there are also some caveats.

Setup

To be able to federate multiple clusters, we first need to setup a federation control plane. Follow the setup guide to setup the federation control plane.

Hybrid cloud capabilities

Federations of Kubernetes Clusters can include clusters running in different cloud providers (e.g. Google Cloud, AWS), and on-premises (e.g. on OpenStack). Simply create all of the clusters that you require, in the appropriate cloud providers and/or locations, and register each cluster’s API endpoint and credentials with your Federation API Server (See the federation admin guide for details).

Thereafter, your API resources can span different clusters and cloud providers.

API resources

Once we have the control plane setup, we can start creating federation API resources. The following guides explain some of the resources in detail:

API reference docs lists all the resources supported by federation apiserver.

Cascading deletion

Kubernetes version 1.6 includes support for cascading deletion of federated resources. With cascading deletion, when you delete a resource from the federation control plane, the corresponding resources in all underlying clusters are also deleted.

Cascading deletion is not enabled by default when using the REST API. To enable it, set the option DeleteOptions.orphanDependents=false when you delete a resource from the federation control plane using REST API. Using kubectl delete will enable cascading deletion by default. You can disable it by running kubectl delete --cascade=false

Note: Kubernetes version 1.5 included cascading deletion support for a subset of federation resources.

For more information

Analytics

Create an Issue Edit this Page