Skip to content

chant kube

llms.txt lists every page for an agent
Optional: hand this page to your coding agentThe steps work by hand too.
Show the whole prompt
Read https://intentius.io/chant/lexicons/k8s/kube/.
In this chant project, use `npx chant kube get`, `describe`, `events`, `logs` and `source` to answer the question I ask about the environment I name, passing `--env <env>`.
Report what you find with the verdict chant gives each object.
Read only: never pass `--yes` to `chant kube apply` or `chant kube delete`.
Never deploy to a real cloud account or shared environment (with `chant run`, `chant components` or a platform's own CLI), approve (a pull request review, `chant approve` or `chant run approve`), override a policy denial (`chant approve policy-override`), or merge; never cut or publish a release (`chant release cut --yes` or `chant release publish`), push or delete a `ci/*` tag (`chant ci tick` pushes them), or change the value of an existing flag; never touch `.chant/allowed_signers` or `chant/lifecycle`.

chant kube is the operator’s view of the same live-cluster data that lifecycle diff --live and behold consume. Every verb goes through the typed API client, with the same cluster binding, credentials and error reporting, so the terminal shows what lifecycle diff --live and behold see.

The k8s lexicon registers it, so it exists only in projects whose config loads the k8s lexicon.

VerbWhat it does
get <kind> [name]List or read any kind the cluster serves — built-in or CRD. Accepts declared chant entity names too. -n, -A, -l, and -o text|wide|json|yaml|name|chant|jsonpath=|custom-columns=. In a chant project, adds a per-row verdict column (declared / drifted / runtime / orphan).
describe <kind> <name>Identity, chant verdict and provenance, spec/status, and recent Events in one view.
logs <pod>Pod logs — -c, --tail, --since, -p, --timestamps. Snapshot only; there is no --follow yet.
events [--for=Kind/name]Cluster events, oldest first.
top pods|nodesUsage from metrics.k8s.io, with an explicit “metrics-server not installed?” error instead of an empty table.
wait <kind> <name> --for=…The same readiness registry the waitForReady Op activity uses — --for=condition=…, --for=delete, --timeout.
source <kind> <name>Live object → the .ts file and composite that declared it, via chant’s provenance.
apply -f <file>Server-side apply through the same function the kubectlApply activity calls. Dry-run by default; --yes persists. Field-manager conflicts render with the owning manager and contested paths named.
delete <kind> <name>Typed delete — the same call the prune path uses. Preview by default; --yes deletes. Warns visibly when the object is not chant-owned. No bare sweeps: an explicit kind and name are required.
versionThe pinned Kubernetes schema version this lexicon was generated against.

The environment binding is honored everywhere. --env <name> resolves k8s.profiles.<env>.context from chant.config.ts; a mismatch with the ambient context is a refusal, not a silent read of the wrong cluster. --context overrides explicitly.

Absence and unreadability are different answers. A kind the cluster can’t serve, an RBAC denial, or a connection failure renders as not observed with its reason — never as No resources found.

Writes share the deploy path. apply and delete call the functions the Op activities call, with the same field manager identity (chant:<stack>), conflict errors and ownership checks. There is no parallel implementation to drift.

behold’s npm run demo:k8s is a one-command tour of everything on this page against a real (local) cluster: it brings up a single-node k3d cluster, deploys a chant-declared app via server-side apply, and shows the declared objects, their managed fields and runtime children, then an out-of-band change reported as field-level drift, including the conflict refusal that names the other field manager. Docker is the only prerequisite; the cluster tears itself down on exit.

logs --follow (needs a streaming seam the client doesn’t have yet), -o go-template, kubectl’s per-kind describe templates, and top’s quantity summation. Each fails with an error instead of approximating.

chant