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

 

相关文章:

  • 2022-03-04
  • 2022-01-07
  • 2021-12-12
  • 2021-07-25
  • 2021-07-09
  • 2022-01-10
  • 2022-01-07
  • 2022-01-07
猜你喜欢
  • 2021-10-05
  • 2022-03-02
  • 2021-07-02
  • 2021-05-30
  • 2022-03-10
  • 2022-12-23
相关资源
相似解决方案