kubectl delete
Delete a named Kubernetes resource with kubectl, using the workflow pod's in-cluster serviceAccount. Idempotent via --ignore-not-found.
Install v1.0.6
Installs the template into your Argo namespace. The URL is pinned to this version.
kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/kubectl-delete/1.0.6/template.yaml
Or with the Argo CLI:
argo template create -n argo https://catalog.dagweave.com/api/v1/items/kubectl-delete/1.0.6/template.yaml
Facts
- Category
- Kubernetes
- Tags
- kubectl kubernetes
- Entrypoint
delete- Template SHA-256
bcc6767e33baebed18af9b529a874fefcc6785e5a2051f21bc41159334babdc2- Source
- kubectl-delete at catalog commit 67458f7
- API
- item document, latest template.yaml
Images and provenance
Every image is pinned by digest, so a rebuilt tag can never change what this version runs.
| Repository | Tag | Digest |
|---|---|---|
bitnami/kubectl | latest | sha256:bedd34c910e2a5ce9836813d16444af449d7fe07a29136d59f34e861e8e660c5 |
Parameters
| Name | Description | Default |
|---|---|---|
kind required |
Resource kind, e.g. deployment, service, configmap. | none |
name required |
none | |
namespace |
default |
WorkflowTemplate
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: kubectl-delete
labels:
dagweave.io/catalog-item: kubectl-delete
annotations:
dagweave.io/catalog-version: "1.0.6"
dagweave.io/catalog-category: "Kubernetes"
spec:
entrypoint: delete
templates:
- name: delete
metadata:
annotations:
# Dagweave Local reads these off the body, the only part of an item that lands in a user's file.
dagweave.io/local-support: unsupported
dagweave.io/local-support-reason: >-
This step shells out to kubectl delete with whatever identity the pod is
given. On Dagweave Local that is the default service account of the hidden
cluster's argo namespace, which holds no delete permission on anything at
all. kubectl sends the delete without reading the object first, so what
comes back is a refusal rather than a missing object, and --ignore-not-found
does not cover a refusal. The step fails, which is at least honest: what you
told it to delete is on a cluster this run cannot reach, and it is still
there.
inputs:
parameters:
# Resource kind, e.g. deployment, service, configmap.
- name: kind
- name: name
- name: namespace
default: default
container:
# bitnami/kubectl:latest
image: bitnami/kubectl@sha256:bedd34c910e2a5ce9836813d16444af449d7fe07a29136d59f34e861e8e660c5
command: [sh, -c]
# Deletes a single named resource using the in-cluster serviceAccount.
# --ignore-not-found makes the step idempotent.
args:
- |
set -eu
kubectl delete "${KIND}" "${NAME}" -n "${NAMESPACE}" --ignore-not-found
env:
- name: KIND
value: "{{inputs.parameters.kind}}"
- name: NAME
value: "{{inputs.parameters.name}}"
- name: NAMESPACE
value: "{{inputs.parameters.namespace}}"
Version history
Read from the item's changelog. Each version has its own JSON document; the pinned catalogue vendors the manifest of the latest one, so that is the version that installs.
-
1.0.6 latest 2026-10-19
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.
kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/kubectl-delete/1.0.6/template.yamlargo template create -n argo https://catalog.dagweave.com/api/v1/items/kubectl-delete/1.0.6/template.yaml -
1.0.5 2026-09-10
Declare localSupport unsupported with its reason, and write the same pair onto the entrypoint template as dagweave.io/local-support annotations. Dagweave Local's lint rules on the compiled pod spec and so cannot see a command that shells out to kubectl, which leaves the item to say it itself. Template metadata only; nothing about what this runs on a real cluster changes.
This release is documented, but its manifest is not vendored here, so it has no install command. Version document
-
1.0.4 2026-08-23
Repin bitnami/kubectl:latest on the current digest, to clear CVE-2026-14456. That is a HIGH openssl denial of service via unbounded memory, fixed upstream in 3.5.7-5.ph5 and present in openssl and openssl-libs on the old pin. The scheduled CVE scan had been red on it for two fires, 22 and 23 August, and nothing else was failing. Same tag, same kubectl, newer build, and the new digest reports no fixed HIGH or CRITICAL at all so it needs no record in hack/image-cve-exceptions.txt.
This release is documented, but its manifest is not vendored here, so it has no install command. Version document
-
1.0.3 2026-08-18
Repin bitnami/kubectl:latest on the current digest. Same tag, same kubectl v1.36.3, newer build. Clears the OS half outright, rpm-libs CVE-2026-44604 on PhotonOS, so this image needs no OS record at all, and takes the eight Go 1.26.6 stdlib advisories with it. Vendored HIGH goes 12 to 6: five x/net and one x/text in the kubectl and yq binaries, recorded in hack/image-cve-exceptions.txt.
This release is documented, but its manifest is not vendored here, so it has no install command. Version document
-
1.0.2 2026-08-11
Repin bitnami/kubectl:latest on the current digest. Same tag, same kubectl v1.36.3, newer build. Clears the one fixable OS-package HIGH the old digest carried, libacl CVE-2026-54369. The twelve vendored HIGH in the kubectl and yq binaries are unchanged and recorded in hack/image-cve-exceptions.txt.
This release is documented, but its manifest is not vendored here, so it has no install command. Version document
-
1.0.1 2026-08-02
Repin bitnami/kubectl:latest on the current digest. Same tag, newer build. Clears the four CRITICAL CVEs the old digest carried; twelve fixable HIGH are still there.
This release is documented, but its manifest is not vendored here, so it has no install command. Version document
-
1.0.0 2026-07-17
Initial release.
This release is documented, but its manifest is not vendored here, so it has no install command. Version document
Run it once
After installing, from the command line.
argo submit -n argo --from workflowtemplate/kubectl-delete \
-p kind=... \
-p name=...
Workflow that references it
A Workflow with the required parameters filled from the examples.
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: kubectl-delete-
spec:
workflowTemplateRef:
name: kubectl-delete
arguments:
parameters:
- name: kind
value: "..."
- name: name
value: "..."
As a step of a larger workflow
steps:
- - name: kubectl-delete
templateRef:
name: kubectl-delete
template: delete