-
Notifications
You must be signed in to change notification settings - Fork 1
/
deployment-1.yaml
50 lines (50 loc) · 1.1 KB
/
deployment-1.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
45
46
47
48
49
50
apiVersion: apps/v1
kind: Deployment
metadata:
name: deployment-1
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: demo-1
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app.kubernetes.io/name: demo-1
spec:
containers:
- name: one
image: demo:1
args:
- --pod=$(POD_NAME)
- --container=container1
- --listen=:8080
- --call=http://localhost:8081
ports:
- containerPort: 8080
env:
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: two
image: demo:1
args:
- --pod=$(POD_NAME)
- --container=container2
- --listen=:8081
- --call=http://localhost:8080
ports:
- containerPort: 8081
env:
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name