Health Probes
Pebblify includes an HTTP health probe server compatible with Kubernetes and other container orchestrators. Enable it with the --health flag on the level-to-pebble or recover commands.
Enable Health Probes
pebblify level-to-pebble --health ~/.gaia/data ./gaia-pebble
pebblify level-to-pebble --health --health-port 9000 ~/.gaia/data ./gaia-pebble
Options
| Flag | Description |
|---|---|
--health | Enable the HTTP health probe server |
--health-port P | Port for the health server (default: 8086) |
Endpoints
The health server exposes three endpoints following the Kubernetes probe conventions:
| Endpoint | Purpose | Success | Failure |
|---|---|---|---|
/healthz/live | Liveness — Is the process alive? | 200 OK | 503 Service Unavailable |
/healthz/ready | Readiness — Can it handle traffic? | 200 OK | 503 Service Unavailable |
/healthz/startup | Startup — Has initialization completed? | 200 OK | 503 Service Unavailable |
A periodic ping ticker runs every 5 seconds to keep the liveness probe alive during long-running migrations.
Kubernetes Example
livenessProbe:
httpGet:
path: /healthz/live
port: 8086
initialDelaySeconds: 5
periodSeconds: 10
readinessProbe:
httpGet:
path: /healthz/ready
port: 8086
periodSeconds: 10
startupProbe:
httpGet:
path: /healthz/startup
port: 8086
failureThreshold: 30
periodSeconds: 10
Docker Health Check
The official Docker image includes a built-in health check targeting the liveness endpoint:
HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8086/healthz/live || exit 1