Get one or many Kubernetes resources of a kind.
type: "io.kestra.plugin.kubernetes.kubectl.Get"
Get all pods from Kubernetes using YAML (<=> kubectl get pods).
id: get_all_pods
namespace: company.team
tasks:
- id: get
type: io.kestra.plugin.kubernetes.kubectl.Get
namespace: default
resourceType: pods
fetchType: FETCH
Get one deployment named my-deployment from Kubernetes using YAML (<=> kubectl get deployment my-deployment).
id: get_one_deployment
namespace: company.team
tasks:
- id: get
type: io.kestra.plugin.kubernetes.kubectl.Get
namespace: default
resourceType: deployments
resourcesNames:
- my-deployment
fetchType: FETCH_ONE
Get two deployments named my-deployment and my-deployment-2 from Kubernetes using YAML (<=> kubectl get deployment my-deployment) and store them in the internal storage.
id: get_two_deployments
namespace: company.team
tasks:
- id: get
type: io.kestra.plugin.kubernetes.kubectl.Get
namespace: default
resourceType: deployments
resourcesNames:
- my-deployment
- my-deployment-2
fetchType: STORE
Get one custom resource named Shirt from Kubernetes using YAML (<=> kubectl get Shirt).
id: get_one_custom_resource
namespace: company.team
tasks:
- id: get
type: io.kestra.plugin.kubernetes.kubectl.Get
namespace: default
resourceType: shirts # could be Shirt
apiGroup: stable.example.com
apiVersion: v1
fetchType: FETCH_ONE
The Kubernetes namespace
The Kubernetes resource type (= kind) (e.g. pod, service)
PT1H
duration
The maximum duration to wait for the job completion.
The Kubernetes resource apiGroup
The Kubernetes resource apiVersion
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.
NONE
STORE
FETCH
FETCH_ONE
NONE
{
"image": "busybox"
}
The configuration of the file sidecar container that handle download and upload of files.
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.
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
..
The Kubernetes resources names
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.
The metadata for a single resource.
Only available when fetchType
is set to FETCH_ONE
.
The count of the fetched or stored resources.
uri
The output files URI in Kestra's internal storage.
Only available when fetchType
is set to STORE
.
v1
The API version
CA certificate as data
CA certificate as file path
Client certificate as data
Client certificate as a file path
RSA
Client key encryption algorithm
default is RSA
Client key as data
Client key as a file path
Client key passphrase
Disable hostname verification
Key store file
Key store passphrase
https://kubernetes.default.svc
The url to the Kubernetes API
The namespace used
Oauth token
Oauth token provider
Password
Trust all certificates
Truststore file
Truststore passphrase
Username
List of all annotations of the resource
Name of the current cluster
date-time
Creation datetime
Deletetion grace period in seconds
date-time
Deletetion datetime
List of finalizers
Generate name of the resource
Generation
List of labels
Name of the resource
Namespace of the resource
Resource version
Direct link on the api of this resource
Generated Uid of this resource
busybox
The image used for the file sidecar container.