1
0
mirror of https://github.com/rancher/rke.git synced 2025-07-04 11:07:43 +00:00

Don't schedule kubedns to Windows node

**Problem:**
Schedule kubedns component to Windows node will cause DNS doesn't work
well

**Solution:**
Add nodeAffinity to kubedns

**Issue:**
https://github.com/rancher/rancher/issues/17423
This commit is contained in:
frank 2019-01-23 14:35:38 +08:00 committed by Alena Prokharchyk
parent 1aa6057cb3
commit 87ab445010

View File

@ -15,6 +15,15 @@ spec:
labels: labels:
k8s-app: kube-dns-autoscaler k8s-app: kube-dns-autoscaler
spec: spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: beta.kubernetes.io/os
operator: NotIn
values:
- windows
serviceAccountName: kube-dns-autoscaler serviceAccountName: kube-dns-autoscaler
containers: containers:
- name: autoscaler - name: autoscaler
@ -128,6 +137,14 @@ spec:
operator: In operator: In
values: ["kube-dns"] values: ["kube-dns"]
topologyKey: kubernetes.io/hostname topologyKey: kubernetes.io/hostname
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: beta.kubernetes.io/os
operator: NotIn
values:
- windows
tolerations: tolerations:
- key: "CriticalAddonsOnly" - key: "CriticalAddonsOnly"
operator: "Exists" operator: "Exists"