Skip to content

Commit 9781390

Browse files
committed
add content/ja/examples/pods/pod-with-affinity-anti-affinity.yaml file
1 parent c6c0923 commit 9781390

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: with-affinity-anti-affinity
5+
spec:
6+
affinity:
7+
nodeAffinity:
8+
requiredDuringSchedulingIgnoredDuringExecution:
9+
nodeSelectorTerms:
10+
- matchExpressions:
11+
- key: kubernetes.io/os
12+
operator: In
13+
values:
14+
- linux
15+
preferredDuringSchedulingIgnoredDuringExecution:
16+
- weight: 1
17+
preference:
18+
matchExpressions:
19+
- key: label-1
20+
operator: In
21+
values:
22+
- key-1
23+
- weight: 50
24+
preference:
25+
matchExpressions:
26+
- key: label-2
27+
operator: In
28+
values:
29+
- key-2
30+
containers:
31+
- name: with-node-affinity
32+
image: registry.k8s.io/pause:2.0
33+

0 commit comments

Comments
 (0)