Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use taint toleration instead of cordon #171

Merged
merged 1 commit into from
Mar 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions src/ClusterBootstrap/template/kube-addons/dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -62,6 +55,9 @@ spec:
port: 9090
initialDelaySeconds: 30
timeoutSeconds: 30
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule
---
kind: Service
apiVersion: v1
Expand Down
3 changes: 3 additions & 0 deletions src/ClusterBootstrap/template/kube-addons/dns-addon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/ClusterBootstrap/template/master/kubelet.service
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down