readiness Probe(就绪型探测):指示容器是否准备好为请求提供服务。如果就绪态探测失败, 端点控制器将从与 Pod 匹配的所有服务的端点列表中删除该 Pod 的 IP 地址。 初始延迟之前的就绪态的状态值默认为 Failure。 如果容器不提供就绪态探针,则默认状态为 Success。注:检查后不健康,将容器设置为Notready;如果使用service来访问,流量不会转发给此种状态的pod
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 83s default-scheduler Successfully assigned default/liveness-exec to docker-desktop
Normal Pulling 82s kubelet Pulling image "busybox"
Normal Pulled 65s kubelet Successfully pulled image "busybox"in17.1068002s
Normal Created 65s kubelet Created container liveness
Normal Started 65s kubelet Started container liveness
Warning Unhealthy 23s (x3 over 33s) kubelet Liveness probe failed: cat: can't open '/tmp/health': No such file or directory
Normal Killing 23s kubelet Container liveness failed liveness probe, will be restarted
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 30s default-scheduler Successfully assigned default/liveness-httpget to docker-desktop
Normal Killing 11s kubelet Container nginx failed liveness probe, will be restarted
Normal Pulled 10s (x2 over 30s) kubelet Container image "nginx" already present on machine
Normal Created 10s (x2 over 30s) kubelet Created container nginx
Normal Started 10s (x2 over 30s) kubelet Started container nginx
Warning Unhealthy 1s (x4 over 21s) kubelet Liveness probe failed: HTTP probe
Normal Killing 9s (x2 over 29s) kubelet Container nginx failed liveness probe, will be restarted
Normal Created 8s (x3 over 48s) kubelet Created container nginx
Normal Started 8s (x3 over 48s) kubelet Started container nginx
failed with statuscode: 404
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 2m57s default-scheduler Successfully assigned default/readiness-httpget to docker-desktop
Normal Pulled 2m57s kubelet Container image "nginx" already present on machine
Normal Created 2m57s kubelet Created container readiness
Normal Started 2m57s kubelet Started container readiness
Warning Unhealthy 3s (x13 over 63s) kubelet Readiness probe failed: HTTP probe failed with statuscode: 404