mirror of
https://github.com/rancher/rke.git
synced 2025-07-02 18:22:33 +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:
|
||||
k8s-app: kube-dns-autoscaler
|
||||
spec:
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: beta.kubernetes.io/os
|
||||
operator: NotIn
|
||||
values:
|
||||
- windows
|
||||
serviceAccountName: kube-dns-autoscaler
|
||||
containers:
|
||||
- name: autoscaler
|
||||
@ -128,6 +137,14 @@ spec:
|
||||
operator: In
|
||||
values: ["kube-dns"]
|
||||
topologyKey: kubernetes.io/hostname
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: beta.kubernetes.io/os
|
||||
operator: NotIn
|
||||
values:
|
||||
- windows
|
||||
tolerations:
|
||||
- key: "CriticalAddonsOnly"
|
||||
operator: "Exists"
|
||||
|
Loading…
Reference in New Issue
Block a user