-
Notifications
You must be signed in to change notification settings - Fork 0
/
drain.yml
52 lines (50 loc) · 1019 Bytes
/
drain.yml
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
45
46
47
48
49
50
51
52
---
apiVersion: v1
kind: Namespace
metadata:
name: httpd
---
apiVersion: v1
kind: Service
metadata:
name: httpd-service-datacenter
namespace: httpd
labels:
app: httpd-app-datacenter
spec:
type: LoadBalancer
ports:
- nodePort: 30004
port: 80
targetPort: 80
selector:
app: httpd-app-datacenter
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: http-deploy
namespace: httpd
spec:
selector:
matchLabels:
app: httpd-app-datacenter
replicas: 4
template:
metadata:
labels:
app: httpd-app-datacenter
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app: httpd-app-datacenter
containers:
- name: httpd-app-datacenter
image: httpd:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80