Cluster federation means aggregating multiple
Kubernetes clusters together and treat them logically as a single cluster.
official Kubernetes cluster federation implementation is the KubeFed.
It allows users to coordinate the configurations of multiple Kubernetes clusters based on a single set of APIs from within a Host cluster.
The approach of KubeFed v2 is fundamentally different from that of the first version of the federation. Instead of creating new resources and an API server, KubeFed v2 builds and uses custom resources extensively.
KubeFed is configured from two types of information:
- A type configuration that indicates which API types KubeFed should handle, and is stored in FederatedTypeConfig.
- A cluster configuration that determines which clusters KubeFed should target, stored in KubeFedCluster and KubeFedConfig
A Host cluster runs the KubeFed control plane, which contains a
KubeFedConfig and a
KubeFedCluster resource for each member cluster. All federated resources are deployed to the Host and replicated from there to the federation’s member clusters. The recommended way to install KubeFed is to deploy it with the official Helm chart. Once you have it up and running, you can add or remove clusters, enable types, and federate resources using the
The KubeFed control plane runs a variety of different controllers, depending on the configuration of features that can be enabled or disabled via FeatureGates. Let’s take a brief look at these features.
It is strongly advised to gain some experience with basic deployments before you try advanced solutions like cluster federation and service mesh.
KubeFed with Pipeline first you have to group clusters created with Pipeline to form a
Cluster Group, then you have to enable
Federation feature on, where you can configure different
KubeFed control-plane parameters.