vcluster_delete
Delete a virtual cluster and its resources permanently, with options to preserve the namespace or persistent volume claim. Provides idempotent cleanup if the cluster is not found.
Instructions
Delete a vcluster.
This action is irreversible - the cluster and all its resources will be permanently removed. By default the host namespace is preserved; the vcluster CLI still cleans up namespaces it created itself.
Args: name: The name of the vcluster to delete. namespace: Optional namespace where the vcluster is located. If not provided, defaults to the vcluster name. delete_namespace: If True, also delete the host namespace. DESTRUCTIVE - this removes every other workload in that namespace as well. Only set it when the namespace exists solely for this vcluster. keep_pvc: If True, retain the vcluster's persistent volume claim so the data survives the deletion. ignore_not_found: If True, succeed instead of erroring when the vcluster does not exist. Useful for idempotent cleanup. wait: If False, return immediately instead of waiting for the deletion to complete. kubeconfig_path: Optional path to a kubeconfig file. If not provided, the default kubeconfig from the environment will be used.
Returns: Union[CommandResult, str]: CommandResult on success, or error object if failed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| wait | No | ||
| keep_pvc | No | ||
| namespace | No | ||
| kubeconfig_path | No | ||
| delete_namespace | No | ||
| ignore_not_found | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |