Fork me on GitHub
瞬间的惊奇真是种确幸,每种确幸都是支玄妙的俳句。吊桥抬起,退回到内心幽静的花园,邂逅的还是那种熟悉的冷冷清清又轰轰烈烈的美妙质感。这真令人欢喜。

探测.yml

liveness.yml

#探测
apiVersion: v1
kind: Pod
metadata:
labels:
test: liveness
name: liveness
spec:
restartPolicy: OnFailure
containers:
- name: liveness
image: busybox
args:
- /bin/sh
- -c
- touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600
livenessProbe:
exec:
command:
- cat
- /tmp/healthy
initialDelaySeconds: 10
periodSeconds: 5

 

readiness.yml

#探测
apiVersion: v1
kind: Pod
metadata:
labels:
test: readiness
name: readiness
spec:
restartPolicy: OnFailure
containers:
- name: readiness
image: busybox
args:
- /bin/sh
- -c
- touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600
readinessProbe:
exec:
command:
- cat
- /tmp/healthy
initialDelaySeconds: 10
periodSeconds: 5

 

posted @ 2018-09-30 23:53  干嘛那么贪睡  阅读(130)  评论(0编辑  收藏  举报