delete_resource
Delete any Kubernetes resource, including cluster-scoped kinds and custom resources defined by CRDs in the cluster snapshot. Safety checks refuse deletes of protected kinds and namespaces, ArgoCD-managed or stack-owned resources, protected RBAC objects, and attached PersistentVolumes — with allow_bypass=true (only when the user explicitly asked for the deletion) every check is lifted and the delete still requires the user's confirmation. Objects owned by a Helm release are additionally checked against that release's live state: while the release is live the delete is refused until acknowledge_live_release names that specific release — allow_bypass never lifts this check.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | Resource kind (e.g., 'ConfigMap', 'Secret', 'Service'). For custom resources use the Kind from the cluster snapshot CRD index (e.g. 'Application', 'IngressRoute'). | |
| name | Yes | Resource name to delete. | |
| dry_run | No | If true, preview the change without executing it. | |
| namespace | No | Kubernetes namespace (not required for cluster-scoped resources). | |
| cluster_id | Yes | Ankra cluster id (UUID) the call targets. Discover ids with list_clusters. | |
| api_version | No | API version (e.g., 'v1', 'apps/v1', or '<group>/<version>' for custom resources from the snapshot CRD index). | v1 |
| allow_bypass | No | Bypass every delete safety check (protected kind/namespace denylists, ArgoCD-managed and stack-owned guards, protected RBAC and attached-volume checks) except the live-Helm-release guard. Set ONLY when the user explicitly asked for this deletion (e.g. 'delete the argocd namespace', 'force', 'bypass'). The confirmation dialog still appears with an enhanced warning and nothing is deleted until the user approves. | |
| acknowledge_live_release | No | Name of the live Helm release (or '<namespace>/<name>') whose ownership of this object the user explicitly acknowledged. Set ONLY after a delete was refused with type='helm_live_release' and the user confirmed deleting an object owned by that specific live release — allow_bypass does not lift this guard. The confirmation dialog still appears with an enhanced warning. |