最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

kubernetes - Command fails in probe but works in kubectl exec - Stack Overflow

programmeradmin0浏览0评论
kubectl exec pod/my-pod -- wget -q -O- 127.0.0.1:3000

The above kubectl exec works.

But, when I run the same as a livenessProbe,

          livenessProbe:
            exec:
              command:
                - /usr/bin/wget
                - -q
                - -O-
                - 127.0.0.1:3000

it fails with wget: can't connect to remote host (127.0.0.1): Connection refused:

  Warning  Unhealthy  4s    kubelet            Liveness probe failed: wget: can't connect to remote host (127.0.0.1): Connection refused

I was expecting the same result from kubectl exec and the probe's exec:.

What differences in the execution environment are causing this?

发布评论

评论列表(0)

  1. 暂无评论