kubeadm: add the preferred pod anti-affinity for CoreDNS Deployment

This commit is contained in:
SataQiu 2022-06-15 12:01:05 +08:00
parent 10066243df
commit 299e745127

View File

@ -78,6 +78,17 @@ spec:
spec:
priorityClassName: system-cluster-critical
serviceAccountName: coredns
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