diff --git a/roles/kubernetes/control-plane/tasks/kubeadm-fix-apiserver.yml b/roles/kubernetes/control-plane/tasks/kubeadm-fix-apiserver.yml index 5376aba81e6..038a193c991 100644 --- a/roles/kubernetes/control-plane/tasks/kubeadm-fix-apiserver.yml +++ b/roles/kubernetes/control-plane/tasks/kubeadm-fix-apiserver.yml @@ -15,3 +15,10 @@ - "Master | Restart kube-controller-manager" - "Master | Restart kube-scheduler" - "Master | reload kubelet" + +- name: Update etcd-servers for apiserver + lineinfile: + dest: "{{ kube_config_dir }}/manifests/kube-apiserver.yaml" + regexp: '^ - --etcd-servers=' + line: ' - --etcd-servers={{ etcd_access_addresses }}' + when: not etcd_kubeadm_enabled | default(false)