Member-only story

Kubernetes POD Liveness

Ishan Liyanage
2 min readNov 30, 2020

I suggest you go thru my previous article on POD readiness first.

Lets take this example.

You start nginx image using docker and it starts to serve users. If the application crashed and nginx process exits, container will exit as well. Since the docker is not orchestration engine, container continue to be dead until we manually create a new container.

If you run the same application with kubernetes, every time when application crashes, it will attempt to restart it and restore. This is what we need.

However what if the application inside the container is not working and container is still up and running?

For example, may be due to bug in code application is crashed and container is still up and running. As far as kuberntes is concerned, the application is assumed to be up so does the container, but users are not served.

In that case the container should be restarted or new container should be brought up. That is where liveness probe can help.

Liveness probe can be configured on the container to periodically test the application inside the container is healthy.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Ishan Liyanage
Ishan Liyanage

Written by Ishan Liyanage

Passionate Technical Lead, Senior Software Developer and free and open source software advocate. Based in Singapore.

No responses yet

Write a response