PodCreate
Create a pod on a Kubernetes cluster, wait until the pod stops and collect its logs.
type: "io.kestra.plugin.kubernetes.PodCreate"
Launch a Pod
id: kubernetes_pod_create
namespace: company.team
tasks:
- id: pod_create
type: io.kestra.plugin.kubernetes.PodCreate
namespace: default
metadata:
labels:
my-label: my-value
spec:
containers:
- name: unittest
image: debian:stable-slim
command:
- 'bash'
- '-c'
- 'for i in {1..10}; do echo $i; sleep 0.1; done'
restartPolicy: Never
Launch a Pod with input files and gather its output files.
id: kubernetes
namespace: company.team
inputs:
- id: file
type: FILE
tasks:
- id: kubernetes
type: io.kestra.plugin.kubernetes.PodCreate
spec:
containers:
- name: unittest
image: centos
command:
- cp
- "{{workingDir}}/data.txt"
- "{{workingDir}}/out.txt"
restartPolicy: Never
waitUntilRunning: PT3M
inputFiles:
data.txt: "{{inputs.file}}"
outputFiles:
- out.txt
The namespace where the pod will be created
The YAML spec of the pod.
The maximum duration to wait for the job completion.
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 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.
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 YAML metadata of the pod.
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
..
Additional time after the pod ends to wait for late logs.
The pod metadata.
The output files URI in Kestra's internal storage
The pod status.
The output variables extracted from the logs of the commands
The API version
CA certificate as data
CA certificate as file path
Client certificate as data
Client certificate as a file path
Client key encryption algorithm
default is RSA
Client key as data
Client key as a file path
Client key passphrase
Key store file
Key store passphrase
The url to the Kubernetes API
The namespace used
Oauth token
Oauth token provider
Password
Truststore file
Truststore passphrase
Username
List of all annotations of the resource
Name of the current cluster
Creation datetime
Deletetion grace period in seconds
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
The image used for the file sidecar container.