Added example for pod preferredDuringSchedulingIgnoredDuringExecution.

This commit is contained in:
Guangya Liu
2017-05-04 16:21:48 +08:00
committed by Andrew Chen
parent 0fb2e07614
commit 297c665eca
3 changed files with 24 additions and 19 deletions
@@ -14,14 +14,16 @@ spec:
- S1
topologyKey: failure-domain.beta.kubernetes.io/zone
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: security
operator: In
values:
- S2
topologyKey: kubernetes.io/hostname
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: security
operator: In
values:
- S2
topologyKey: kubernetes.io/hostname
containers:
- name: with-pod-affinity
image: gcr.io/google_containers/pause:2.0