【问题标题】:"kubectl describe pod" does not report proper url of liveness probe“kubectl describe pod”未报告活动探测的正确 url
【发布时间】:2021-10-02 18:20:41
【问题描述】:

以下是运行kubectl -n mynamespace describe pod pod1 后的活跃度和就绪度报告:

Liveness:   http-get http://:8080/a/b/c/.well-known/heartbeat delay=3s timeout=3s period=10s #success=1 #failure=3
Readiness:  http-get http://:8080/a/b/c/.well-known/heartbeat delay=3s timeout=3s period=10s #success=1 #failure=3

  1. 这是有效的(工作)网址吗? http://:80/

  2. #success=1 #failure=3 是什么意思?

【问题讨论】:

    标签: http kubernetes kubernetes-pod


    【解决方案1】:

    结果完全正确:

    • http://:8080 表示它将在您的 pod 内的端口 8080 中尝试 http-get
    • #success=1 表示成功阈值为 1(默认值),因此当它第一次得到答案时,它会将 Pod 标记为活动或就绪
    • #failure=3 表示失败阈值为 3(再次默认),因此第三次调用失败时会将其标记为未就绪或尝试重新启动。

    查看官方文档:https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes

    您可以尝试执行此命令来查看探针是如何配置的:

    kubectl -n mynamespace get pod pod1 -o yaml
    

    【讨论】:

      猜你喜欢
      • 2021-09-19
      • 2019-11-20
      • 2023-03-11
      • 1970-01-01
      • 1970-01-01
      • 2021-05-18
      • 2020-07-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多