> ## Documentation Index
> Fetch the complete documentation index at: https://schedy.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Health checks

> GET /healthz and /readyz - liveness and readiness probes for Kubernetes and container orchestration. No authentication required.

Schedy provides two health endpoints for Kubernetes and container orchestration platforms. Both endpoints require **no authentication**.

## Liveness probe

```
GET /healthz
```

Returns `200 OK` if the process is running, with the running build's version in the body.
Used by Kubernetes `livenessProbe` to detect if the container should be restarted, and by operators to answer "what's deployed here?".

```bash theme={null}
curl http://localhost:8080/healthz
# {"status":"ok","version":"v0.9.0"}
```

Dev builds report `"dev"`; `go install` builds report their module version.

This endpoint always responds successfully as long as the process is running. No dependencies are checked.

## Readiness probe

```
GET /readyz
```

Returns `200 OK` if Schedy is ready to accept new tasks. Returns `503 Service Unavailable` if the database is unreachable. Used by Kubernetes `readinessProbe` to determine if the pod should receive traffic.

```bash theme={null}
curl http://localhost:8080/readyz
# Returns: 200 OK if ready, 503 Service Unavailable if database fails
```

### Kubernetes example

Configure both probes in your pod spec:

```yaml theme={null}
livenessProbe:
  httpGet:
    path: /healthz
    port: 8080
  initialDelaySeconds: 10
  periodSeconds: 10

readinessProbe:
  httpGet:
    path: /readyz
    port: 8080
  initialDelaySeconds: 5
  periodSeconds: 5
```

The readiness probe checks if the database (BadgerDB) is accessible. If it fails, the pod is removed from the service load balancer until the database recovers.
