Openshift / Kubernetes活度探 头弹簧执行器

问题描述 投票:0回答:1

我已经实现了弹簧执行器的健康状况端点,并将其添加到Livelines探针中-http-get http://:8080/actuator/health

当我描述Pod时,我看不到#success计数器在增加

http-gethttp://:8080/actuator/healthdelay = 60s timeout = 20s period = 10s#success = 1#failure = 3

如何知道活动度探针是否实际在默认执行器的运行状况端点下运行

spring kubernetes openshift spring-boot-actuator
1个回答
0
投票

这里成功的值是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

© www.soinside.com 2019 - 2024. All rights reserved.