Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ada3d36

Browse files
committedJul 31, 2020
Add examples
1 parent f2a84d4 commit ada3d36

File tree

3 files changed

+66
-0
lines changed

3 files changed

+66
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
kind: Pod
2+
apiVersion: v1
3+
metadata:
4+
name: mypod
5+
labels:
6+
foo: bar
7+
spec:
8+
topologySpreadConstraints:
9+
- maxSkew: 1
10+
topologyKey: zone
11+
whenUnsatisfiable: DoNotSchedule
12+
labelSelector:
13+
matchLabels:
14+
foo: bar
15+
affinity:
16+
nodeAffinity:
17+
requiredDuringSchedulingIgnoredDuringExecution:
18+
nodeSelectorTerms:
19+
- matchExpressions:
20+
- key: zone
21+
operator: NotIn
22+
values:
23+
- zoneC
24+
containers:
25+
- name: pause
26+
image: k8s.gcr.io/pause:3.1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
kind: Pod
2+
apiVersion: v1
3+
metadata:
4+
name: mypod
5+
labels:
6+
foo: bar
7+
spec:
8+
topologySpreadConstraints:
9+
- maxSkew: 1
10+
topologyKey: zone
11+
whenUnsatisfiable: DoNotSchedule
12+
labelSelector:
13+
matchLabels:
14+
foo: bar
15+
containers:
16+
- name: pause
17+
image: k8s.gcr.io/pause:3.1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
kind: Pod
2+
apiVersion: v1
3+
metadata:
4+
name: mypod
5+
labels:
6+
foo: bar
7+
spec:
8+
topologySpreadConstraints:
9+
- maxSkew: 1
10+
topologyKey: zone
11+
whenUnsatisfiable: DoNotSchedule
12+
labelSelector:
13+
matchLabels:
14+
foo: bar
15+
- maxSkew: 1
16+
topologyKey: node
17+
whenUnsatisfiable: DoNotSchedule
18+
labelSelector:
19+
matchLabels:
20+
foo: bar
21+
containers:
22+
- name: pause
23+
image: k8s.gcr.io/pause:3.1

0 commit comments

Comments
 (0)
Please sign in to comment.