k8s 实验 Liveness and Readiness probe

kubectl create -f helloworld-healthcheck.yml && watch -n1 kubectl get pods

image

基本上10秒就起来了

image

加入readiness 检查

image

kubectl create -f helloworld-liveness-readiness.yml && watch -n1 kubectl get pods

pod 显示running的时候并不是1/1 ready ,而是检查/目录后在显示1/1 ready

image

image

image

猜你喜欢

转载自blog.51cto.com/433266/2536837