diff --git a/templates/kubedns.go b/templates/kubedns.go index efe9a8b9..fb7af9db 100644 --- a/templates/kubedns.go +++ b/templates/kubedns.go @@ -113,6 +113,17 @@ spec: annotations: scheduler.alpha.kubernetes.io/critical-pod: '' spec: + 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"