🚀 New! Kestra raises $3 million to grow Learn more

PodCreate PodCreate

yaml
type: "io.kestra.plugin.kubernetes.PodCreate"

Create a pod on a Kubernetes cluster, wait until the pod stops and collect its logs.

Examples

yaml
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

Properties

delete

  • Type: boolean
  • Dynamic:
  • Required: ✔️
  • Default: true

Whether the pod should be deleted upon completion

namespace

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

The namespace where the pod will be created

resume

  • Type: boolean
  • Dynamic:
  • Required: ✔️
  • Default: true

Whether to reconnect to the current pod if it exists

spec

  • Type: object
  • Dynamic: ✔️
  • Required: ✔️

Full YAML spec for the pod.

waitRunning

  • Type: string
  • Dynamic:
  • Required: ✔️
  • Default: 3600.000000000
  • Format: duration

The maximum duration to wait for the pod completion.

waitUntilRunning

  • Type: string
  • Dynamic:
  • Required: ✔️
  • Default: 600.000000000
  • Format: duration

The maximum duration to wait until the pod is created. This timeout is the maximum time that Kubernetes scheduler can take to

  • schedule the pod
  • pull the pod image
  • and start the pod.

connection

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:

  1. System properties
  2. Environment variables
  3. Kube config file
  4. Service account token and a mounted CA certificate.

You can pass a full configuration with all options if needed.

fileSidecar

The configuration for file sidecar that handle download/upload.

inputFiles

  • Type: object
  • SubType: string
  • Dynamic: ✔️
  • Required:

Input files are extra files provided by the user that make it easier to organize code. You can provide a map of key-value pairs with key being the file name and value being the file's content.Those files will be uploaded to the pod's working directory and will be available for the command to use within the execution context.In a Python script, those files will be written to a temporary working directory from which the flow is executed. In Bash scripts, you can reach files using a workingDir variable e.g. source {{workingDir}}/myfile.sh.

metadata

  • Type: object
  • Dynamic: ✔️
  • Required:

Full YAML metadata for the pod.

outputFiles

  • Type: array
  • SubType: string
  • Dynamic:
  • Required:

Output file list that will be uploaded to the internal storage List of keys that will generate temporary files. Within the command, you can use the special variable named outputFiles.key to retrieve it.

Outputs

metadata

The full pod metadata

outputFiles

  • Type: object
  • SubType: string
  • Dynamic:
  • Required:

The output files uri in Kestra internal storage

status

The full pod status

vars

  • Type: object
  • Dynamic:
  • Required:

The value extracted from the output of the commands

Definitions

io.kestra.plugin.kubernetes.models.Connection

Properties

apiVersion
  • Type: string
  • Dynamic: ✔️
  • Required:
  • Default: v1

The API version

caCertData
  • Type: string
  • Dynamic: ✔️
  • Required:

CA certificate as data

caCertFile
  • Type: string
  • Dynamic: ✔️
  • Required:

CA certificate as file path

clientCertData
  • Type: string
  • Dynamic: ✔️
  • Required:

Client certificate as data

clientCertFile
  • Type: string
  • Dynamic: ✔️
  • Required:

Client certificate as a file path

clientKeyAlgo
  • Type: string
  • Dynamic: ✔️
  • Required:
  • Default: RSA

Client key encryption algorithm default is RSA

clientKeyData
  • Type: string
  • Dynamic: ✔️
  • Required:

Client key as data

clientKeyFile
  • Type: string
  • Dynamic: ✔️
  • Required:

Client key as a file path

clientKeyPassphrase
  • Type: string
  • Dynamic: ✔️
  • Required:

Client key passphrase

disableHostnameVerification
  • Type: boolean
  • Dynamic:
  • Required:

Disable hostname verification

keyStoreFile
  • Type: string
  • Dynamic: ✔️
  • Required:

Key store file

keyStorePassphrase
  • Type: string
  • Dynamic: ✔️
  • Required:

Key store passphrase

masterUrl
  • Type: string
  • Dynamic: ✔️
  • Required:
  • Default: https://kubernetes.default.svc

The url to the Kubernetes API

namespace
  • Type: string
  • Dynamic: ✔️
  • Required:

The namespace used

oauthToken
  • Type: string
  • Dynamic: ✔️
  • Required:

Oauth token

oauthTokenProvider

Oauth token provider

trustCerts
  • Type: boolean
  • Dynamic:
  • Required:

Trust all certificates

trustStoreFile
  • Type: string
  • Dynamic: ✔️
  • Required:

Truststore file

trustStorePassphrase
  • Type: string
  • Dynamic: ✔️
  • Required:

Truststore passphrase

io.fabric8.kubernetes.api.model.ContainerState

Properties

running
terminated
waiting

io.fabric8.kubernetes.api.model.PodCondition

Properties

lastProbeTime
  • Type: string
  • Dynamic:
  • Required:
lastTransitionTime
  • Type: string
  • Dynamic:
  • Required:
message
  • Type: string
  • Dynamic:
  • Required:
reason
  • Type: string
  • Dynamic:
  • Required:
status
  • Type: string
  • Dynamic:
  • Required:
type
  • Type: string
  • Dynamic:
  • Required:

io.fabric8.kubernetes.api.model.Quantity

Properties

amount
  • Type: string
  • Dynamic:
  • Required:
format
  • Type: string
  • Dynamic:
  • Required:

io.kestra.plugin.kubernetes.AbstractPod-SideCar

Properties

image
  • Type: string
  • Dynamic: ✔️
  • Required:
  • Default: busybox

The image name used for file sidecar.

io.kestra.plugin.kubernetes.models.Metadata

Properties

annotations
  • Type: object
  • SubType: string
  • Dynamic:
  • Required:

List of all annotations of the resource

clusterName
  • Type: string
  • Dynamic:
  • Required:

Name of the current cluster

creationTimestamp
  • Type: string
  • Dynamic:
  • Required:
  • Format: date-time

Creation datetime

deletionGracePeriodSeconds
  • Type: integer
  • Dynamic:
  • Required:

Deletetion grace period in seconds

deletionTimestamp
  • Type: string
  • Dynamic:
  • Required:
  • Format: date-time

Deletetion datetime

finalizers
  • Type: array
  • SubType: string
  • Dynamic:
  • Required:

List of finalizers

generateName
  • Type: string
  • Dynamic:
  • Required:

Generate name of the resource

generation
  • Type: integer
  • Dynamic:
  • Required:

Generation

labels
  • Type: object
  • SubType: string
  • Dynamic:
  • Required:

List of labels

managedFields

List of managed fields

name
  • Type: string
  • Dynamic:
  • Required:

Name of the resource

namespace
  • Type: string
  • Dynamic:
  • Required:

Namespace of the resource

ownerReferences

List of owner reference

resourceVersion
  • Type: string
  • Dynamic:
  • Required:

Resource version

  • Type: string
  • Dynamic:
  • Required:

Direct link on the api of this resource

uid
  • Type: string
  • Dynamic:
  • Required:

Generated Uid of this resource

io.kestra.plugin.kubernetes.models.OAuthTokenProvider

Properties

output
  • Type: string
  • Dynamic:
  • Required:
task

io.fabric8.kubernetes.api.model.OwnerReference

Properties

apiVersion
  • Type: string
  • Dynamic:
  • Required:
blockOwnerDeletion
  • Type: boolean
  • Dynamic:
  • Required:
controller
  • Type: boolean
  • Dynamic:
  • Required:
kind
  • Type: string
  • Dynamic:
  • Required:
name
  • Type: string
  • Dynamic:
  • Required:
uid
  • Type: string
  • Dynamic:
  • Required:

io.fabric8.kubernetes.api.model.FieldsV1

io.fabric8.kubernetes.api.model.ResourceRequirements

Properties

claims
limits
requests

io.fabric8.kubernetes.api.model.ContainerStateTerminated

Properties

containerID
  • Type: string
  • Dynamic:
  • Required:
exitCode
  • Type: integer
  • Dynamic:
  • Required:
finishedAt
  • Type: string
  • Dynamic:
  • Required:
message
  • Type: string
  • Dynamic:
  • Required:
reason
  • Type: string
  • Dynamic:
  • Required:
signal
  • Type: integer
  • Dynamic:
  • Required:
startedAt
  • Type: string
  • Dynamic:
  • Required:

io.fabric8.kubernetes.api.model.ManagedFieldsEntry

Properties

apiVersion
  • Type: string
  • Dynamic:
  • Required:
fieldsType
  • Type: string
  • Dynamic:
  • Required:
fieldsV1
manager
  • Type: string
  • Dynamic:
  • Required:
operation
  • Type: string
  • Dynamic:
  • Required:
subresource
  • Type: string
  • Dynamic:
  • Required:
time
  • Type: string
  • Dynamic:
  • Required:

io.kestra.plugin.kubernetes.models.PodStatus

Properties

additionalProperties
  • Type: object
  • Dynamic:
  • Required:
conditions
containerStatuses
ephemeralContainerStatuses
hostIP
  • Type: string
  • Dynamic:
  • Required:
initContainerStatuses
message
  • Type: string
  • Dynamic:
  • Required:
nominatedNodeName
  • Type: string
  • Dynamic:
  • Required:
phase
  • Type: string
  • Dynamic:
  • Required:
podIP
  • Type: string
  • Dynamic:
  • Required:
podIPs
qosClass
  • Type: string
  • Dynamic:
  • Required:
reason
  • Type: string
  • Dynamic:
  • Required:
startTime
  • Type: string
  • Dynamic:
  • Required:
  • Format: date-time

io.fabric8.kubernetes.api.model.ContainerStateRunning

Properties

startedAt
  • Type: string
  • Dynamic:
  • Required:

io.fabric8.kubernetes.api.model.ContainerStatus

Properties

allocatedResources
containerID
  • Type: string
  • Dynamic:
  • Required:
image
  • Type: string
  • Dynamic:
  • Required:
imageID
  • Type: string
  • Dynamic:
  • Required:
lastState
name
  • Type: string
  • Dynamic:
  • Required:
ready
  • Type: boolean
  • Dynamic:
  • Required:
resources
restartCount
  • Type: integer
  • Dynamic:
  • Required:
started
  • Type: boolean
  • Dynamic:
  • Required:
state

io.fabric8.kubernetes.api.model.ContainerStateWaiting

Properties

message
  • Type: string
  • Dynamic:
  • Required:
reason
  • Type: string
  • Dynamic:
  • Required:

io.fabric8.kubernetes.api.model.PodIP

Properties

ip
  • Type: string
  • Dynamic:
  • Required:

io.fabric8.kubernetes.api.model.ResourceClaim

Properties

name
  • Type: string
  • Dynamic:
  • Required: