DEV Community

Cover image for What is Readiness & Liveness Probes in Kubernetes?
Sagar Jadhav
Sagar Jadhav

Posted on • Originally published at developersthought.in

2

What is Readiness & Liveness Probes in Kubernetes?

Kubernetes uses Readiness & Liveness probes to manage pod lifecycle. Readiness probe is used to determine whether pod is ready to accept the traffic or not and liveness probe is used to determine whether pod is functioning properly or not. Read more about them here. In this blog I am adding readiness & liveness probe to PHPMyAdmin application.

Architecture

Alt Text

Prerequisites:

Deploy PHPMyAdmin Application

Follow Deploy phpMyAdmin application on kubernetes blog

Go to session_4 directory

cd ../session_4/
Enter fullscreen mode Exit fullscreen mode

Step 1: Delete PHPMyAdmin deployment

kubectl delete deployment phpmyadmin
Enter fullscreen mode Exit fullscreen mode

Step 2: Deploy PHPMyAdmin deployment with Readiness & Liveness probes

kubectl create -f phpmyadmin-deployment.yaml
Enter fullscreen mode Exit fullscreen mode
kubectl get pods --watch
Enter fullscreen mode Exit fullscreen mode

Exit once pod goes into running state

Step 9: Browse phpmyadmin application

Go to browser and browse http://IP_ADDRESS:30030. Login with root user & test password

here IP_ADDRESS is the ip address of virtual machine where kubernetes is running.

Demo

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay