This guide covers the commands and endpoints operators use after GONK is running.
If admin.require_auth is enabled, export the same token used by the gateway config:
export GONK_ADMIN_TOKEN="change-me"Use --url when the gateway is not on http://localhost:8080:
gonk-cli --url http://edge-gateway.local:8080 routes listgonk-cli status
gonk-cli health
curl http://localhost:8080/_gonk/health
curl http://localhost:8080/_gonk/ready
curl http://localhost:8080/_gonk/liveHealth endpoints are intentionally simple for process supervisors and container orchestrators.
gonk-cli status uses /_gonk/status and includes runtime mode, admin protection, audit state, route summaries, upstreams, cache totals, and circuit breaker state.
Run static operational checks before deploying or reloading config:
gonk-cli doctor -c gonk.yamlWhen GONK is running, check the live admin endpoint and HTTP/HTTPS upstream reachability:
export GONK_ADMIN_TOKEN="..."
gonk-cli --url http://edge-gateway.local:8080 doctor -c gonk.yaml --check-admin --check-upstreamsThe doctor reports blocking errors for invalid auth wiring, missing production admin protection, broken TLS files, and unreachable live checks when those checks are requested. It reports warnings for items that may be valid in some deployments, such as metrics on an unprotected network or production TLS termination outside GONK.
Runtime route introspection is available through the CLI:
gonk-cli routes list
gonk-cli routes describe protected-apiTo append a simple route to a YAML file:
gonk-cli routes add \
-c gonk.yaml \
--name public-status \
--path /status \
--upstream http://status-service:3000 \
--methods GET \
--auth noneThis rewrites the YAML file, so use it for simple operational edits. For heavily commented configs, prefer editing by hand and validating afterward.
gonk-cli cache stats
gonk-cli cache clearCache stats include entries, fresh/expired counts, cached bytes, hits, and misses per route.
gonk-cli metrics
gonk-cli metrics --route protected-api
curl http://localhost:8080/metricsRequest metrics use stable route labels instead of raw request paths. This keeps Prometheus cardinality bounded when URLs contain IDs.
Enable audit logs in config:
audit:
enabled: trueAudit records are written through the configured logger. They include route, method, path, status, duration, client IP, identity type, identity, roles, and scopes.
Use production mode to reject demo secrets:
runtime:
environment: productionFor demos that intentionally use sample secrets, set runtime.allow_demo_secrets: true. Do not carry that flag into real deployments.
When logging to a file:
gonk-cli logs tail --file /var/log/gonk/gonk.log
gonk-cli logs tail --file /var/log/gonk/gonk.log --route protected-apiWhen running under systemd or Docker, use the platform log collector directly.
Before restart, reload, or rollout:
gonk-cli validate -c gonk.yaml
gonk-cli doctor -c gonk.yaml
go test ./...For a clean Linux verification environment:
docker run --rm -v "$PWD:/app" -w /app golang:1.21 go test ./...See DEPLOYMENT.md for the release archives, GHCR image, Docker Compose production template, and systemd unit.
Run the quickstart smoke test locally:
make demo-smokeThis starts the Docker Compose quickstart, calls a public route, generates a JWT, calls a protected route, and verifies Prometheus metrics.
Run the mTLS walkthrough:
make mtls-demoFor offline PKI bootstrap, validation, and certificate rotation, see AIRGAP_PKI.md.