Skip to content

Commit 9cb190a

Browse files
author
giri.kuncoro
committed
Add probe yaml examples
1 parent 838d1b1 commit 9cb190a

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
labels:
5+
test: liveness
6+
name: liveness-exec
7+
spec:
8+
containers:
9+
- name: liveness
10+
image: k8s.gcr.io/busybox
11+
args:
12+
- /bin/sh
13+
- -c
14+
- touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600
15+
livenessProbe:
16+
exec:
17+
command:
18+
- cat
19+
- /tmp/healthy
20+
initialDelaySeconds: 5
21+
periodSeconds: 5
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
labels:
5+
test: liveness
6+
name: liveness-http
7+
spec:
8+
containers:
9+
- name: liveness
10+
image: k8s.gcr.io/liveness
11+
args:
12+
- /server
13+
livenessProbe:
14+
httpGet:
15+
path: /healthz
16+
port: 8080
17+
httpHeaders:
18+
- name: Custom-Header
19+
value: Awesome
20+
initialDelaySeconds: 3
21+
periodSeconds: 3
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: goproxy
5+
labels:
6+
app: goproxy
7+
spec:
8+
containers:
9+
- name: goproxy
10+
image: k8s.gcr.io/goproxy:0.1
11+
ports:
12+
- containerPort: 8080
13+
readinessProbe:
14+
tcpSocket:
15+
port: 8080
16+
initialDelaySeconds: 5
17+
periodSeconds: 10
18+
livenessProbe:
19+
tcpSocket:
20+
port: 8080
21+
initialDelaySeconds: 15
22+
periodSeconds: 20

0 commit comments

Comments
 (0)