We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6c0923 commit 9781390Copy full SHA for 9781390
content/ja/examples/pods/pod-with-affinity-anti-affinity.yaml
@@ -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
21
22
+ - key-1
23
+ - weight: 50
24
25
26
+ - key: label-2
27
28
29
+ - key-2
30
+ containers:
31
+ - name: with-node-affinity
32
+ image: registry.k8s.io/pause:2.0
33
+
0 commit comments