This action requires a Kubernetes service account token.

DeleteKubernetesResource — deletes an existing resource in a Kubernetes cluster.

Request example

group: apps
version: v1
resource_type: deployments
resource_name: nginx-deployment
namespace: example
ignore_not_found: true

Request specification

NameRequiredDescriptionPossible values
groupYesAPI group of the resource. Specifies the API group to which the object being deleted belongsDetermining the required Group and Version
versionYesAPI version of the resourceDetermining the required Group and Version
resource_typeYesType of resource to deletepods, services, deployments, statefulsets, daemonsets, replicasets, jobs, cronjobs, nodes, namespaces, configmaps, secrets, persistentvolumes, persistentvolumeclaims, limitranges, resourcequotas, horizontalpodautoscalers, ingresses, networkpolicies, serviceaccounts, roles, clusterroles, rolebindings, clusterrolebindings, podsecuritypolicies, storageclasses, volumeattachments, events, endpoints, customresourcedefinitions
resource_nameYesName of the resource to delete-
namespaceYesNamespace containing the resource-
ignore_not_foundNoIf true, deleting an object that does not exist in the cluster succeeds. Defaults to false: deleting a missing object failstrue, false

Note

The ignore_not_found parameter does not suppress other Kubernetes API errors. Use it in deletion processes that can run more than once.