This guide explains how we can manage multiple Kubernetes clusters using federation. Federation proposal details the use cases motivating cluster federation.
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.
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.
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.
Kubernetes version 1.5 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.
To enable cascading deletion, set the option
DeleteOptions.orphanDependents=false when you delete a resource from the
federation control plane.
The following Federated resources are affected by cascading deletion:
Note: By default, deleting a resource from federation control plane does not delete the corresponding resources from underlying clusters.