maqpna apply
Validate manifests, then server-side apply them (agents, policies, trust tiers, ...)
Synopsis#
maqpna apply -f FILE|DIR|- [-R] [-n NS] [--dry-run none|server] [--force-conflicts] [--validate true|strict|false]Description#
Objects are applied with server-side apply (field manager maqpna-cli); the API server runs the CRD schema, CEL rules and admission policies. With --validate (default) the offline checks of maqpna validate run first when this build has them; --validate=strict fails when it does not. Exit 1 when any object fails.
Flags#
| Flag | Type | Description | Default |
|---|---|---|---|
-R, --recursive | switch | recurse into sub-directories of -f directories | none |
--dry-run | string | none | server (the API server runs admission and validation, nothing is stored) | none |
-f, --filename | string | manifest file, directory or - (stdin); repeatable | none |
--force-conflicts | switch | take ownership of fields managed by another field manager | none |
-n, --namespace | string | namespace | default |
--server-side | switch | always on: maqpna apply uses server-side apply (field manager maqpna-cli) | true |
--validate | string | true: run maqpna validate first when available; strict: fail when it is not; false: server-side checks only | true |
The global flags (--context, -o, --no-color, ...) work with every command.
Examples#
maqpna apply -f coder.yaml -n team-a
maqpna apply -f manifests/ -R --dry-run serverWhat happens when you run it#
--dry-run: none | server (the API server runs admission and validation, nothing is stored).- Prints a table by default;
-o jsonor-o yamlprint the data, and--jq EXPRfilters the JSON.
Exit codes#
| Code | Meaning |
|---|---|
0 | success |
1 | error (the message says what failed, with a hint when there is one) |
2 | usage error: unknown flag, missing argument or bad value; the synopsis is printed |
3 | a check failed, a change is blocked, or a result did not match (tamper, policy mismatch) (not used by this command) |
Related commands#
Terminal demo#
This command needs a Kubernetes cluster with MAQPNA installed, so the recording shows its help. Try it against a cluster from Install.