loading...
Cover image for What is Readiness & Liveness Probes in Kubernetes?

What is Readiness & Liveness Probes in Kubernetes?

sagarjadhv23 profile image Sagar Jadhav Originally published at developersthought.in ・1 min read

Kubernetes Primer (5 Part Series)

1) What is Deployment, Service, Secret and ConfigMap in Kubernetes? 2) What is Persistent Volume (PV) & Persistent Volume Claim (PVC) in Kubernetes? 3) What is Ingress Controller in Kubernetes? 4) What is Readiness & Liveness Probes in Kubernetes? 5) How to deploy applications using Helm 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/

Step 1: Delete PHPMyAdmin deployment

kubectl delete deployment phpmyadmin

Step 2: Deploy PHPMyAdmin deployment with Readiness & Liveness probes

kubectl create -f phpmyadmin-deployment.yaml
kubectl get pods --watch

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

Kubernetes Primer (5 Part Series)

1) What is Deployment, Service, Secret and ConfigMap in Kubernetes? 2) What is Persistent Volume (PV) & Persistent Volume Claim (PVC) in Kubernetes? 3) What is Ingress Controller in Kubernetes? 4) What is Readiness & Liveness Probes in Kubernetes? 5) How to deploy applications using Helm in Kubernetes?

Posted on Jun 21 by:

sagarjadhv23 profile

Sagar Jadhav

@sagarjadhv23

Backend Developer (Cloud ☁️) | Cloud Technology Enthusiast (🐳 ☸) Redhat Certified OpenShift Administrator

Discussion

markdown guide