maqpna replace
Replace resources by file (kubectl replace)
Synopsis#
maqpna replace -f FILE|DIR|URL|- [-R] [-n NS] [--force] [--dry-run none|client|server]Description#
replace updates each object to exactly the file's content (fields not in the file are dropped). --force deletes and re-creates the objects.
Flags#
| Flag | Type | Description | Default |
|---|---|---|---|
-R, --recursive | switch | recurse into sub-directories of -f directories | none |
--dry-run | string | none | client (nothing is sent) | server (the API server checks the change and stores nothing) | none |
-f, --filename | string | manifest file, directory, URL or - (stdin); repeatable | none |
--force | switch | delete the objects and create them again | none |
-n, --namespace | string | namespace | default |
The global flags (--context, -o, --no-color, ...) work with every command.
Examples#
maqpna replace -f toolpolicy.yaml
maqpna get tp coder-policy -n team-a -o yaml | sed 's/deny/allow/' | maqpna replace -f -What happens when you run it#
--dry-run: none | client (nothing is sent) | server (the API server checks the change and stores nothing).--force: delete the objects and create them again.- 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) |