mirror of
https://github.com/rancher/rke.git
synced 2025-09-09 02:51:15 +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:
@@ -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"
|
||||
|
Reference in New Issue
Block a user