-
Notifications
You must be signed in to change notification settings - Fork 58
/
deployment.yaml
38 lines (37 loc) · 956 Bytes
/
deployment.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: whoami
labels:
kubernetes.courselabs.co: affinity
spec:
replicas: 6
selector:
matchLabels:
app: whoami
template:
metadata:
labels:
app: whoami
update: prefer-spread-zone
spec:
containers:
- name: app
image: sixeyed/whoami:21.04
nodeSelector:
kubernetes.io/os: linux
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app: whoami
topologyKey: topology.kubernetes.io/region
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
podAffinityTerm:
labelSelector:
matchLabels:
app: whoami
topologyKey: topology.kubernetes.io/zone