MAQPNADocs

maqpna uninstall

Uninstall MAQPNA (resources, keys and agent namespaces are kept unless --purge)

Operateplugin: maqpna-install-o json | yaml

Synopsis#

maqpna uninstall [--release maqpna] [-n NS] [--wait] [--dry-run] [--purge] [--yes]

Description#

By default the CRDs and all custom resources, the tokens and identity key Secrets (helm.sh/resource-policy: keep) and the agent namespaces stay, so a reinstall picks them up. --purge also deletes the maqpna.com CRDs (which deletes every Agent, AgentSession, ToolPolicy, ... in the cluster), the release's kept Secrets and its agent namespaces. Export the audit ledger first (maqpna audit export).

uninstall asks for confirmation on a terminal; --yes (-y) skips the question, and is required when stdin is not a terminal (scripts, CI).

Flags#

FlagTypeDescriptionDefault
--debugswitchprint Helm's debug log to stderrnone
--dry-runswitchprint what would be deleted; change nothingnone
--kube-contextstringkubeconfig context (default: the maqpna context's)none
-n, --namespacestringnamespace of the MAQPNA control plane (the Helm release)maqpna-system
--purgeswitchalso delete the maqpna.com CRDs (and every custom resource), kept Secrets and agent namespacesnone
--releasestringHelm release namemaqpna
--timeoutdurationtimeout of Kubernetes operations (CRDs Established, --wait)10m0s
--waitswitchwait until the release's resources are deletednone
-y, --yesswitchdo not ask for confirmation (required when stdin is not a terminal)none

The global flags (--context, -o, --no-color, ...) work with every command.

Examples#

maqpna uninstall --dry-run
maqpna uninstall
# In a script: no prompt, everything deleted
maqpna uninstall --purge --yes

What happens when you run it#

  • Runs the lifecycle plugin maqpna-install (next to maqpna or on PATH), which drives the Helm v3 SDK against the cluster of your kubeconfig (--kubeconfig, --kube-context).
  • --dry-run: print what would be deleted; change nothing.
  • --yes: do not ask for confirmation (required when stdin is not a terminal).
  • --wait: wait until the release's resources are deleted.
  • Prints a table by default; -o json or -o yaml print the data, and --jq EXPR filters the JSON.

Exit codes#

CodeMeaning
0success
1error (the message says what failed, with a hint when there is one)
2usage error: unknown flag, missing argument or bad value; the synopsis is printed
3a check failed, a change is blocked, or a result did not match (tamper, policy mismatch) (not used by this command)

Terminal demo#

maqpna uninstall --help.cast

This command needs a Kubernetes cluster with MAQPNA installed, so the recording shows its help. Try it against a cluster from Install.