Troubleshooting & Fixing Readiness and Liveness probe issue in Azure AKS

We are facing issues with Liveness and readiness. When we deploy the application in the Kubernetes cluster, it goes to Crashloopbackoff.   

Here I explained how we solve this issue.  

A liveness probe sends a signal to the container is either alive (passing) or dead (failing). If the container is alive, then the current state is good. If the container is dead, it attempts to heal the application by restarting it.  

Readiness probes to know whether the container being probed is ready to start receiving network traffic. If our container enters a state where it is still alive but cannot handle incoming network traffic, it will not send network traffic to a container that isn’t ready. 

In our case, we are using the Httpget call for Liveness and readiness, as shown in the above snip. For this, we got an Error for the pod to get started and went crashloopbackoff; we tried to increase initialdelayseconds and period seconds also, but it was no use; we got the same Error.

For This issue, we use an alternative solution. Instead of httpGet, we use tcpSocket for liveness and readiness and increase initialdelayseconds and period seconds; it worked because we are using reverse-proxy sidecar in front of the app in the same pod, and we use the default.conf file, in this file, we add configuration of proxy details, virtual host details, and probe file location where it is placed in the container.

So, this is the way we resolve the issue.

Cloud Engineer

Gabriel Chutuape

A technology enthusiast passionate about automation, Gabriel Chutuape is a Cloud Engineer at ISmile Technologies. He’s part of the ISmile Technologies Cloud enablement team that help customers to design/solution/project engineering, integrating and implementing infrastructure technologies & services.

CLOUD Engineer

Gopi Krishna

I’m working as Cloud DevOps Engineer. Expertise in technologies of Kubernetes, cloud services and cloud-native services, and DevOps technologies in various clouds.

Register a Free Cloud ROI Assesment Workshop

Register a Free Cloud ROI Assesment Workshop

Get a Detailed assessment report with recommendations with an assessment report

Schedule free Workshop
Register a Free Cloud ROI Assesment Workshop
Register a Free Cloud ROI Assesment Workshop

Related articles you may would like to read

Leveraging Data Management Maturity Model to boost data management capabilities

Request a Consultation