diff --git a/src/ClusterBootstrap/template/kube-addons/dashboard.yaml b/src/ClusterBootstrap/template/kube-addons/dashboard.yaml index 3c8bf1224..b84a5d8c9 100755 --- a/src/ClusterBootstrap/template/kube-addons/dashboard.yaml +++ b/src/ClusterBootstrap/template/kube-addons/dashboard.yaml @@ -32,18 +32,11 @@ spec: metadata: labels: app: kubernetes-dashboard - # Comment the following annotation if Dashboard must not be deployed on master - annotations: - scheduler.alpha.kubernetes.io/tolerations: | - [ - { - "key": "dedicated", - "operator": "Equal", - "value": "master", - "effect": "NoSchedule" - } - ] spec: + # Only run dashboard on master + nodeSelector: + infrastructure: active + volumes: containers: - name: kubernetes-dashboard image: gcr.io/google_containers/kubernetes-dashboard-amd64:v1.5.1 @@ -62,6 +55,9 @@ spec: port: 9090 initialDelaySeconds: 30 timeoutSeconds: 30 + tolerations: + - key: node-role.kubernetes.io/master + effect: NoSchedule --- kind: Service apiVersion: v1 diff --git a/src/ClusterBootstrap/template/kube-addons/dns-addon.yml b/src/ClusterBootstrap/template/kube-addons/dns-addon.yml index 5d06d3345..a73fa0c68 100755 --- a/src/ClusterBootstrap/template/kube-addons/dns-addon.yml +++ b/src/ClusterBootstrap/template/kube-addons/dns-addon.yml @@ -66,6 +66,9 @@ spec: labels: k8s-app: kube-dns spec: + # Only run kube-dns on master + nodeSelector: + infrastructure: active volumes: - name: kube-dns-config configMap: diff --git a/src/ClusterBootstrap/template/master/kubelet.service b/src/ClusterBootstrap/template/master/kubelet.service index 222638a78..43b921c9b 100755 --- a/src/ClusterBootstrap/template/master/kubelet.service +++ b/src/ClusterBootstrap/template/master/kubelet.service @@ -16,7 +16,7 @@ ExecStartPre=/bin/bash -c 'if lspci | grep -qE "[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA- ExecStart=/opt/bin/kubelet \ --kubeconfig=/etc/kubernetes/worker-kubeconfig.yaml \ --require-kubeconfig=true \ - --register-schedulable=false \ + --register-with-taints=node-role.kubernetes.io/master=:NoSchedule \ --container-runtime=docker \ --allow-privileged=true \ --feature-gates="Accelerators=true" \