Skip to main content
Install healthzkit, expose /healthz/live and /healthz/ready, and point Kubernetes at those routes. For a real database check using your existing client, follow Integrate healthzkit. The custom database adapter below is a placeholder; replace it before using it in production.

Hono (copy-paste)

Point a liveness probe at GET /healthz/live and a readiness probe at GET /healthz/ready.
Need Express, Fastify, Elysia, Next.js, or Node http? See Framework guides.

Fetch-API servers (Bun, Deno, Workers)

createFetchHandler answers {basePath}/live, {basePath}/ready, and {basePath}/startup (default /healthz) on GET and HEAD. Other methods on those routes return 405. Unknown paths return 404.

handleRequest

If you already route HTTP yourself, pass the incoming path:

Default routes and basePath

By default, healthzkit expects: The default basePath is /healthz. Set basePath in the root config to move all three routes (for example /api/health → /api/health/live, /api/health/ready, and /api/health/startup). handleRequest(req) returns null when req.path does not match any recognized route, so you can try it first and fall through to the rest of your application.

AgnosticResponse

Handlers resolve to AgnosticResponse:
Map status, headers, and body onto your framework’s response object, or call toFetchResponse(res) for Hono, Next.js, Bun, and Workers.