我已经实现了弹簧执行器的健康状况端点,并将其添加到Livelines探针中-http-get http://:8080/actuator/health
当我描述Pod时,我看不到#success计数器在增加
http-gethttp://:8080/actuator/healthdelay = 60s timeout = 20s period = 10s#success = 1#failure = 3
如何知道活动度探针是否实际在默认执行器的运行状况端点下运行
这里成功的值是successThreshold。它是非计数器字段
kubectl explain pod.spec.containers.livenessProbe.successThreshold
DESCRIPTION:
Minimum consecutive successes for the probe to be considered successful
after having failed. Defaults to 1. Must be 1 for liveness. Minimum value
is 1.
同样有失败阈值
kubectl explain pod.spec.containers.livenessProbe.failureThreshold
当Pod启动并且探测失败时,Kubernetes将尝试使用failThreshold时间,然后放弃。放弃活动探针意味着重新启动容器。如果准备就绪,可以将Pod标记为“未就绪”。默认值为3。最小值为1。configure-probes
如何知道活动度探针是否实际在默认执行器的运行状况端点下运行
查看您的pod的日志
kubectl logs -f $pod
或检查探测吊舱的kubelet的日志
journalctl -f -u kubelet