Kubernetes Readiness探针失败错误 [英] Kubernetes Readiness probe failed error

查看:1031
本文介绍了Kubernetes Readiness探针失败错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用头盔升级命令在kubernetes上运行容器时,出现此错误:

While running my container on kubernetes using helm upgrade command, I am getting this error:

准备情况调查失败:获取 http://172.17.0.6:3003/:拨打tcp 172.17.0.6:3003:getsockopt:连接被拒绝'.

'Readiness probe failed: Get http://172.17.0.6:3003/: dial tcp 172.17.0.6:3003: getsockopt: connection refused'.

我的docker映像用于node.js应用程序,我正尝试通过minikube对其进行管理.

My docker image is for a node.js application and I am trying to manage it through minikube.

推荐答案

对于此处的其他任何人,如果使用掌舵来管理部署,则需要在/templates文件夹的deployments.yaml模板中设置initialDelaySeconds.在livenessProbe下.如果探针无法连接(如我的情况),livenessProbe将强制重新启动您的Pod.并没有给我的应用程序足够的时间来构建.

For anyone else here, if using helm to manage your deployments, you need to set initialDelaySeconds it in the deployments.yaml template in the /templates folder under livenessProbe. The livenessProbe will force restart your pod if the probe cannot connect, as was happening with mine. It wasn't giving my application enough time to build.

这篇关于Kubernetes Readiness探针失败错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆