Skip to content

Feature: Implement K8s Liveness and Readiness Probes #17

@fred-maina

Description

@fred-maina

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

  1. Uncomment the livenessProbe and readinessProbe sections in k8s/deployment.yaml.
  2. Ensure the httpGet path is correct (/actuator/health).
  3. Set the port to 8080 (the containerPort).
  4. 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).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions