What’s the difference between readinessProbe and livenessProbe? How would you configure them?
TechnicalTech lead javaJava Tech LeadDevOps EngineerSystem AdministratorReadinessProbe checks if a pod is ready to serve traffic, while livenessProbe determines if a pod is alive and needs to be restarted. I configure a readiness probe to use an HTTP GET request to a specific endpoint that returns a 200 status when the application is ready. For liveness, I might use a TCP socket check to ensure the application is responsive.
Using these probes effectively helps maintain high availability and ensures that traffic is only sent to healthy pods.