/
探针 & 健康检查

探针 & 健康检查

三种 Probe

k8s 存在三种探针来实现健康检查

  • Readiness Probe

  • Liveness Probe

  • Startup Probe

Readiness Probe

Readiness Probe 用于展示 Pod 的 Ready 状态

如果 Pod Ready 不为 true,service 不会路由流量到 pod 上

Liveness Probe

Liveness Probe 与 Readiness Probe 不同点在于,如果 liveness probe 未通过,会直接重启 pod(相比之下,readiness probe 只会修改 ready 状态)

Startup Probe

Readiness Probe 和 Liveness Probe 更多的是用于判断正在运行中的 pod 的健康状态;虽然可以利用 initialDelaySeconds 来做到容忍慢启动,但这也会导致 pod 的成功/失败状态被延迟

Startup Probe 专用于处理这种情况,当 Startup Probe 不通过时,Readiness Probe 和 Liveness Probe 不会运行

Related content

k8s 自动扩容
k8s 自动扩容
More like this
Kubernetes Dashboard
Kubernetes Dashboard
More like this
托管平台
托管平台
More like this
撰写文档的工具
撰写文档的工具
More like this
安装 Confluence
安装 Confluence
More like this
Week 51 @ 2024 算法周记【双指针链表+丑数】
Week 51 @ 2024 算法周记【双指针链表+丑数】
More like this