Add pod antiaffinity to kubedns template
@@ -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"
