【问题标题】:Liveness probe failed: OCI runtime exec failed: exec failed: EOF: unknown活性探测失败:OCI 运行时执行失败:执行失败:EOF:未知
【发布时间】:2020-07-06 09:26:14
【问题描述】:

pod 启动一次失败。可能是什么原因?容器启动晚于 LivenessProbe 被激活?

活性探针配置为:

livenessProbe:
    exec:
      command:
      - /usr/bin/commandA
      - --is-alive
    initialDelaySeconds: 5
    periodSeconds: 2
    successThreshold: 1
    failureThreshold: 3

来自 pod 的错误日志

$ kubectl describe po t1004-rcpsdl-79c455547b-kdtvk -n cran1

Containers:
xxxxxx:
......
Port: <none>
Host Port: <none>
State: Running
Started: Fri, 03 Jul 2020 06:01:26 +0000
Last State: Terminated
Reason: Error
Exit Code: 1
Started: Fri, 03 Jul 2020 06:00:45 +0000
Finished: Fri, 03 Jul 2020 06:01:25 +0000
Ready: True
Restart Count: 1

Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled <unknown> default-scheduler Successfully assigned cran1/t1004-rcpsdl-79c455547b-kdtvk to controller-0
Normal Pulled 105m (x2 over 106m) kubelet, controller-0 Container image "xxxxxxxxxxxxxxx" already present on machine
Normal Created 105m (x2 over 106m) kubelet, controller-0 Created container rcpsdl
Normal Started 105m (x2 over 106m) kubelet, controller-0 Started container rcpsdl
Warning Unhealthy 92m kubelet, controller-0 Liveness probe failed: OCI runtime exec failed: exec failed: EOF: unknown

【问题讨论】:

  • 检查 pod 被调度的节点上的 kubelet 日志
  • 您还有其他 pod 正在运行吗?错误来自运行时,您可以检查节点的日志(来自 kubernentes 和系统上)吗?您使用的是哪个容器运行时?

标签: kubernetes containers


【解决方案1】:

尝试增加这些参数的时间间隔

initialDelaySeconds: 300
periodSeconds: 10
successThreshold: 1
failureThreshold: 5

参考:Original Post

希望它对你有用。

【讨论】:

    猜你喜欢
    • 2021-06-03
    • 2018-06-08
    • 1970-01-01
    • 2021-06-08
    • 2023-03-15
    • 1970-01-01
    • 2019-04-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多