From c825f4d18047764b8d3b831777ace318a57c6fde Mon Sep 17 00:00:00 2001 From: okamototk Date: Tue, 9 Oct 2018 17:40:43 +0900 Subject: [PATCH] Untaint master when it has node role (#3466) --- roles/kubernetes/master/tasks/kubeadm-setup.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/kubernetes/master/tasks/kubeadm-setup.yml b/roles/kubernetes/master/tasks/kubeadm-setup.yml index 39a45d31d..f67350479 100644 --- a/roles/kubernetes/master/tasks/kubeadm-setup.yml +++ b/roles/kubernetes/master/tasks/kubeadm-setup.yml @@ -210,3 +210,8 @@ - name: kubeadm | cleanup old certs if necessary import_tasks: kubeadm-cleanup-old-certs.yml when: old_apiserver_cert.stat.exists + +- name: kubeadm | Remove taint for master with node role + command: "{{ bin_dir }}/kubectl taint node {{ inventory_hostname }} node-role.kubernetes.io/master:NoSchedule-" + delegate_to: "{{groups['kube-master']|first}}" + when: inventory_hostname in groups['kube-node']