Files
website/content/ko/examples/pods/pod-with-pod-affinity.yaml
June Yi 3f6dfb1ee3 Fourth Korean L10n Work For Release 1.17 (#19127)
* translate assign-pod-node.md (#18955)
* correct the misspelling (#19063)
* Update to Outdated files in dev-1.17-ko.4 branch. (#19002)

Co-Authored-By: KimMJ <a01083612486@gmail.com>
Co-Authored-By: forybm <forybm1@naver.com>
Co-Authored-By: Yuk, Yongsu <ysyukr@gmail.com>

Co-authored-by: KimMJ <a01083612486@gmail.com>
Co-authored-by: forybm <forybm1@naver.com>
Co-authored-by: Yuk, Yongsu <ysyukr@gmail.com>
2020-02-14 17:59:27 -08:00

30 lines
757 B
YAML

apiVersion: v1
kind: Pod
metadata:
name: with-pod-affinity
spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: security
operator: In
values:
- S1
topologyKey: failure-domain.beta.kubernetes.io/zone
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: security
operator: In
values:
- S2
topologyKey: failure-domain.beta.kubernetes.io/zone
containers:
- name: with-pod-affinity
image: k8s.gcr.io/pause:2.0