-
Notifications
You must be signed in to change notification settings - Fork 0
/
pod-example.yaml
44 lines (44 loc) · 991 Bytes
/
pod-example.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
38
39
40
41
42
43
44
#
# demo on nodeAffinity, resources, tolerations
#
apiVersion: v1
kind: Pod
metadata:
name: nginx-pod-with-resources
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.17.10
ports:
- containerPort: 80
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "128Mi"
cpu: "500m"
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: disktype
operator: In
values:
- ssd
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: region
operator: In
values:
- us-west-1
tolerations:
- key: "key1"
operator: "Equal"
value: "value1"
effect: "NoSchedule"