mirror of
https://github.com/rancher/rke.git
synced 2025-07-04 02:57:52 +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:
parent
1aa6057cb3
commit
87ab445010
@ -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"
|
||||||
|
Loading…
Reference in New Issue
Block a user