Delete
Delete one or many Kubernetes resources of a kind.
type: "io.kestra.plugin.kubernetes.kubectl.Delete"
Delete a list of pods from Kubernetes using YAML (<=> kubectl delete pod my-pod my-pod-2).
id: delete_pods
namespace: company.team
tasks:
- id: delete
type: io.kestra.plugin.kubernetes.kubectl.Delete
namespace: default
resourceType: pods
resourcesNames:
- my-pod
- my-pod-2
YES
The Kubernetes namespace
YES
The Kubernetes resource type (= kind) (e.g. pod, service)
YES
The Kubernetes resources names
YES
PT10M
duration
The maximum duration to wait until the job and the pod is created.
This timeout is the maximum time that Kubernetes scheduler will take to
- schedule the job
- pull the pod image
- and start the pod.
YES
The Kubernetes resource apiGroup
YES
The Kubernetes resource apiVersion
NO
The connection parameters to the Kubernetes cluster
If no connection is defined, we try to load the connection from the current context in the following order:
- System properties
- Environment variables
- Kube config file
- Service account token and a mounted CA certificate.
You can pass a full configuration with all options if needed.
NO
{
"image": "busybox"
}
The configuration of the file sidecar container that handle download and upload of files.
YES
The files to create on the local filesystem. It can be a map or a JSON object.
The files will be available inside the kestra/working-dir
directory of the container. You can use the special variable {{workingDir}}
in your command to refer to it.
YES
The files from the container filesystem to send to Kestra's internal storage.
Only files created inside the kestra/working-dir
directory of the container can be retrieved.
Must be a list of glob expressions relative to the current working directory, some examples: my-dir/**
, my-dir/*/**
or my-dir/my-file.txt
..
YES
PT1H
duration
The maximum duration to wait for the job completion.
YES
v1
The API version
YES
CA certificate as data
YES
CA certificate as file path
YES
Client certificate as data
YES
Client certificate as a file path
YES
RSA
Client key encryption algorithm
default is RSA
YES
Client key as data
YES
Client key as a file path
YES
Client key passphrase
NO
Disable hostname verification
YES
Key store file
YES
Key store passphrase
YES
https://kubernetes.default.svc
The url to the Kubernetes API
YES
The namespace used
YES
Oauth token
NO
Oauth token provider
YES
Password
NO
Trust all certificates
YES
Truststore file
YES
Truststore passphrase
YES
Username
YES
busybox
The image used for the file sidecar container.
NO
NO