Description
The k8s/deployment.yaml file has livenessProbe and readinessProbe sections commented out. The application.properties file correctly exposes the Spring Boot Actuator endpoints (/actuator/health, /actuator/info) via management.endpoints.web.exposure.include.
These probes are essential for a stable Kubernetes deployment.
- Readiness Probes tell K8s when the app is ready to accept traffic.
- Liveness Probes tell K8s if the app has crashed and needs to be restarted.
Acceptance Criteria
- Uncomment the
livenessProbe and readinessProbe sections in k8s/deployment.yaml.
- Ensure the
httpGet path is correct (/actuator/health).
- Set the port to
8080 (the containerPort).
- Tune the probe settings:
initialDelaySeconds: Should be long enough for Spring Boot to start (e.g., 60 seconds for liveness, 30 for readiness).
periodSeconds: How often to probe (e.g., 10-15 seconds).
failureThreshold: How many failures before action (e.g., 3 for liveness, 5 for readiness).
Description
The
k8s/deployment.yamlfile haslivenessProbeandreadinessProbesections commented out. Theapplication.propertiesfile correctly exposes the Spring Boot Actuator endpoints (/actuator/health,/actuator/info) viamanagement.endpoints.web.exposure.include.These probes are essential for a stable Kubernetes deployment.
Acceptance Criteria
livenessProbeandreadinessProbesections ink8s/deployment.yaml.httpGetpath is correct (/actuator/health).8080(thecontainerPort).initialDelaySeconds: Should be long enough for Spring Boot to start (e.g.,60seconds for liveness,30for readiness).periodSeconds: How often to probe (e.g.,10-15seconds).failureThreshold: How many failures before action (e.g.,3for liveness,5for readiness).