SetupHealth and Readiness Check

Health and Readiness Check Endpoints

Polyaxon provides health check endpoints for all components. These endpoints are used by Kubernetes liveness and readiness probes, load balancers, and monitoring tools.

Overview

ComponentEndpointTypePurpose
API/Gateway/healthz/HTTPCheck if the API service is healthy and ready
Schedulerhealthzexec (entrypoint)Check if the scheduler process is healthy
Compilerhealthzexec (entrypoint)Check if the compiler process is healthy
Agenthealthzexec (entrypoint)Check if the agent process is healthy

API/Gateway Health Check

The API/Gateway exposes an HTTP health endpoint at /healthz/. This is used for both liveness and readiness probes in Kubernetes.

curl http://localhost:8000/healthz/

Response Codes:

  • 200 OK — Service is healthy and ready to receive traffic
  • 503 Service Unavailable — Service is not functioning

The Helm chart configures both liveness and readiness probes on this endpoint by default:

livenessProbe:
  httpGet:
    path: /healthz/
    port: 80
  initialDelaySeconds: 20
  periodSeconds: 20
  failureThreshold: 10

readinessProbe:
  httpGet:
    path: /healthz/
    port: 80
  initialDelaySeconds: 20
  periodSeconds: 20
  failureThreshold: 10

Background Services Health Checks

The scheduler, compiler, and agent use exec-based health checks that run the healthz command via the container entrypoint:

livenessProbe:
  exec:
    command: ["/bin/bash", "./entrypoint.sh", "healthz"]
  initialDelaySeconds: 20
  periodSeconds: 20
  failureThreshold: 10

readinessProbe:
  exec:
    command: ["/bin/bash", "./entrypoint.sh", "healthz"]
  initialDelaySeconds: 20
  periodSeconds: 20
  failureThreshold: 10

Customization

You can override the probe settings in your Helm config.yaml. See the common Helm reference for all available options.