-
Notifications
You must be signed in to change notification settings - Fork 3
/
app2.yml
60 lines (56 loc) · 1.07 KB
/
app2.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
53
54
55
56
57
58
59
60
apiVersion: v1
kind: Namespace
metadata:
name: nginx-app
labels:
name: nginxs
---
apiVersion: v1
kind: ReplicationController
metadata:
name: mynignx2
spec:
replicas: 1
selector:
name: nginx2
template:
metadata:
labels:
name: nginx2
spec:
containers:
- name: nginx2
image: nginx
ports:
- containerPort: 80
readinessProbe:
tcpSocket:
port: 80
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
tcpSocket:
port: 80
initialDelaySeconds: 15
periodSeconds: 20
volumeMounts:
- mountPath: /usr/share/nginx/html
name: git-volume2
volumes:
- name: git-volume2
persistentVolumeClaim:
claimName: myclaim2
---
apiVersion: v1
kind: Service
metadata:
name: nginx2
spec:
selector:
name: nginx2
ports:
- name: http
port: 80
protocol: TCP
nodePort: 31605
type: NodePort