add anti-affinity to kube-dns deployment
@@ -22,6 +22,18 @@ spec:
kubernetes.io/cluster-service: "true"
version: v20
spec:
+ affinity:
+ podAntiAffinity:
+ preferredDuringSchedulingIgnoredDuringExecution:
+ - weight: 100
+ podAffinityTerm:
+ labelSelector:
+ matchExpressions:
+ - key: k8s-app
+ operator: In
+ values:
+ - kube-dns
+ topologyKey: kubernetes.io/hostname
volumes:
- name: kube-dns-config
configMap:
