Kubernetes Readiness probe failed error

Karan Sodhi picture Karan Sodhi · Jan 31, 2018 · Viewed 29.2k times · Source

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

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

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

Answer

Dane Jordan picture Dane Jordan · Aug 20, 2018

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.