{
  "name": "kubectl-delete",
  "title": "kubectl delete",
  "category": "Kubernetes",
  "tags": [
    "kubectl",
    "kubernetes"
  ],
  "version": "1.0.6",
  "date": "2026-10-19",
  "notes": "Repin bitnami/kubectl:latest on the tag's current digest. What is still open against it is recorded in hack/image-cve-exceptions.txt. Same tool, same arguments; nothing about what the step runs changes.",
  "latest": true,
  "installable": true,
  "url": "https://catalog.dagweave.com/api/v1/items/kubectl-delete/1.0.6.json",
  "templateUrl": "https://catalog.dagweave.com/api/v1/items/kubectl-delete/1.0.6/template.yaml",
  "entrypoint": "delete",
  "parameters": [
    {
      "name": "kind",
      "title": "Kind",
      "description": "Resource kind, e.g. deployment, service, configmap.",
      "type": "string",
      "required": true
    },
    {
      "name": "name",
      "title": "Name",
      "type": "string",
      "required": true
    },
    {
      "name": "namespace",
      "title": "Namespace",
      "type": "string",
      "required": false,
      "default": "default"
    }
  ],
  "images": [
    {
      "ref": "bitnami/kubectl@sha256:bedd34c910e2a5ce9836813d16444af449d7fe07a29136d59f34e861e8e660c5",
      "repository": "bitnami/kubectl",
      "tag": "latest",
      "digest": "sha256:bedd34c910e2a5ce9836813d16444af449d7fe07a29136d59f34e861e8e660c5"
    }
  ],
  "install": {
    "kubectl": "kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/kubectl-delete/1.0.6/template.yaml",
    "argo": "argo template create -n argo https://catalog.dagweave.com/api/v1/items/kubectl-delete/1.0.6/template.yaml"
  },
  "template": "apiVersion: argoproj.io/v1alpha1\nkind: WorkflowTemplate\nmetadata:\n  name: kubectl-delete\n  labels:\n    dagweave.io/catalog-item: kubectl-delete\n  annotations:\n    dagweave.io/catalog-version: \"1.0.6\"\n    dagweave.io/catalog-category: \"Kubernetes\"\nspec:\n  entrypoint: delete\n  templates:\n    - name: delete\n      metadata:\n        annotations:\n          # Dagweave Local reads these off the body, the only part of an item that lands in a user's file.\n          dagweave.io/local-support: unsupported\n          dagweave.io/local-support-reason: \u003e-\n            This step shells out to kubectl delete with whatever identity the pod is\n            given. On Dagweave Local that is the default service account of the hidden\n            cluster's argo namespace, which holds no delete permission on anything at\n            all. kubectl sends the delete without reading the object first, so what\n            comes back is a refusal rather than a missing object, and --ignore-not-found\n            does not cover a refusal. The step fails, which is at least honest: what you\n            told it to delete is on a cluster this run cannot reach, and it is still\n            there.\n      inputs:\n        parameters:\n          # Resource kind, e.g. deployment, service, configmap.\n          - name: kind\n          - name: name\n          - name: namespace\n            default: default\n      container:\n        # bitnami/kubectl:latest\n        image: bitnami/kubectl@sha256:bedd34c910e2a5ce9836813d16444af449d7fe07a29136d59f34e861e8e660c5\n        command: [sh, -c]\n        # Deletes a single named resource using the in-cluster serviceAccount.\n        # --ignore-not-found makes the step idempotent.\n        args:\n          - |\n            set -eu\n            kubectl delete \"${KIND}\" \"${NAME}\" -n \"${NAMESPACE}\" --ignore-not-found\n        env:\n          - name: KIND\n            value: \"{{inputs.parameters.kind}}\"\n          - name: NAME\n            value: \"{{inputs.parameters.name}}\"\n          - name: NAMESPACE\n            value: \"{{inputs.parameters.namespace}}\"\n",
  "templateSha256": "bcc6767e33baebed18af9b529a874fefcc6785e5a2051f21bc41159334babdc2",
  "source": "https://github.com/dagweave/catalog/tree/67458f74dbbf913b03177f3cefc69424be85eb1d/catalog/kubectl-delete",
  "catalogSha": "67458f74dbbf913b03177f3cefc69424be85eb1d"
}
