Add back anti-affinity to kube-dns pods.

This change also updates to the latest kube-dns images. The
anti-affinity change was previously rolled back in https://github.com/kubernetes/kubernetes/pull/59357
Adding this back as there have been imrpovements in scheduler
performance since.
This commit is contained in:
Pavithra Ramesh 2020-04-17 10:36:21 -07:00
parent 87eb688ec9
commit aaa0d12cc7
3 changed files with 33 additions and 0 deletions

View File

@ -90,6 +90,17 @@ spec:
securityContext:
supplementalGroups: [ 65534 ]
fsGroup: 65534
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: k8s-app
operator: In
values: ["kube-dns"]
topologyKey: kubernetes.io/hostname
tolerations:
- key: "CriticalAddonsOnly"
operator: "Exists"

View File

@ -90,6 +90,17 @@ spec:
securityContext:
supplementalGroups: [ 65534 ]
fsGroup: 65534
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: k8s-app
operator: In
values: ["kube-dns"]
topologyKey: kubernetes.io/hostname
tolerations:
- key: "CriticalAddonsOnly"
operator: "Exists"

View File

@ -90,6 +90,17 @@ spec:
securityContext:
supplementalGroups: [ 65534 ]
fsGroup: 65534
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: k8s-app
operator: In
values: ["kube-dns"]
topologyKey: kubernetes.io/hostname
tolerations:
- key: "CriticalAddonsOnly"
operator: "Exists"