With Kubernetes federation you can have a collection of Kubernetes clusters and create various federated objects like config maps or daemon sets that if created with a context of federation-cluster they will be applied to each cluster in the federation. However, if another Kubernetes cluster is added LATER to the federation does the federation control plane update the new cluster with all the federated objects in the existing clusters?
For federated DaemonSet
, yes. A new DaemonSet
object will be created in newly joined clusters.
The answer is somewhat complicated for a federated Deployment
. If rebalance
is set to true and weight preferences aren't explicitly set in federation.kubernetes.io/deployment-preferences
then the replicas are redistributed when new clusters join. There is no redistribution otherwise.
federation.kubernetes.io/deployment-preferences
is defined in https://github.com/kubernetes/kubernetes/blob/master/federation/apis/federation/types.go#L133