-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnode-affinity.yaml
37 lines (37 loc) · 921 Bytes
/
node-affinity.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: node-affinity
name: node-affinity
spec:
replicas: 1
selector:
matchLabels:
app: node-affinity
template:
metadata:
labels:
app: node-affinity
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: failure-domain.beta.kubernetes.io/zone
operator: In
values:
- us-west-2b
- us-west-2c
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: beta.kubernetes.io/instance-type
operator: In
values:
- t3.large
containers:
- image: nginx
name: node-affinity