-
Notifications
You must be signed in to change notification settings - Fork 0
/
kube-nginx.yaml
56 lines (54 loc) · 1.08 KB
/
kube-nginx.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
51
52
53
54
55
56
apiVersion: v1
kind: Service
metadata:
name: nginx-service
spec:
type: LoadBalancer
selector:
app: nginx
ports:
- name: http
port: 80
targetPort: 80
- name: https
port: 443
targetPort: 443
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
replicas: 2
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx-hsw:0.7.2
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
- containerPort: 443
readinessProbe:
httpGet:
path: /ready
port: 80
initialDelaySeconds: 3
periodSeconds: 3
initContainers:
- name: init-container
image: busybox:latest
command:
- sh
- -c
- >
while ! nc -z hsw-service 8080; do
echo "Waiting for hsw-service to become ready..."
sleep 2
done