diff --git a/bootstrapper/internal/kubernetes/k8sapi/kubeadm_config.go b/bootstrapper/internal/kubernetes/k8sapi/kubeadm_config.go index 28bdc5454c..11648b10c4 100644 --- a/bootstrapper/internal/kubernetes/k8sapi/kubeadm_config.go +++ b/bootstrapper/internal/kubernetes/k8sapi/kubeadm_config.go @@ -63,6 +63,19 @@ func (c *KubdeadmConfiguration) InitConfiguration(externalCloudProvider bool, cl }, // Target kubernetes version of the control plane. KubernetesVersion: clusterVersion, + // Configration of the etcd cluster spawned for the control plane. + Etcd: kubeadm.Etcd{ + Local: &kubeadm.LocalEtcd{ + ExtraArgs: map[string]string{ + // Alleviate problems where nodes that are partitioned from the etcd cluster + // and rejoin later trigger leader re-elections. Leader re-elections can + // disrupt requests. + // Background: https://groups.google.com/g/scylladb-dev/c/Aj6rzpEgkSc/m/_41ZeHAuAwAJ. + // Raft is the consensus algorithm used by etcd. + "pre-vote": "true", + }, + }, + }, // necessary to be able to access the kubeapi server through localhost APIServer: kubeadm.APIServer{ ControlPlaneComponent: kubeadm.ControlPlaneComponent{