From 8216e821d36409efe214f17008f853ad755b10a3 Mon Sep 17 00:00:00 2001 From: okamototk Date: Thu, 3 Jan 2019 20:42:23 +0900 Subject: [PATCH] Fix kubeadm v1beta1 configuration taint (#3928) * Use master node taint same as kubeadm configuration v1alpha3 or before. --- inventory/sample/group_vars/k8s-cluster/addons.yml | 4 ++-- .../master/templates/kubeadm-config.v1beta1.yaml.j2 | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/inventory/sample/group_vars/k8s-cluster/addons.yml b/inventory/sample/group_vars/k8s-cluster/addons.yml index 7f2437754..a044f5bee 100644 --- a/inventory/sample/group_vars/k8s-cluster/addons.yml +++ b/inventory/sample/group_vars/k8s-cluster/addons.yml @@ -52,9 +52,9 @@ ingress_nginx_enabled: false # ingress_nginx_nodeselector: # node-role.kubernetes.io/master: "" # ingress_nginx_tolerations: -# - key: "key" +# - key: "node-role.kubernetes.io/master" # operator: "Equal" -# value: "value" +# value: "" # effect: "NoSchedule" # ingress_nginx_namespace: "ingress-nginx" # ingress_nginx_insecure_port: 80 diff --git a/roles/kubernetes/master/templates/kubeadm-config.v1beta1.yaml.j2 b/roles/kubernetes/master/templates/kubeadm-config.v1beta1.yaml.j2 index 88876ee74..ab8a5f791 100644 --- a/roles/kubernetes/master/templates/kubeadm-config.v1beta1.yaml.j2 +++ b/roles/kubernetes/master/templates/kubeadm-config.v1beta1.yaml.j2 @@ -9,9 +9,8 @@ nodeRegistration: {% endif %} {% if inventory_hostname in groups['kube-master'] and inventory_hostname not in groups['kube-node'] %} taints: - - key: "kubeadmNode" - value: "master" - effect: "NoSchedule" + - effect: NoSchedule + key: node-role.kubernetes.io/master {% endif %} {% if container_manager == 'crio' %} criSocket: /var/run/crio/crio.sock