PodCreate PodCreate

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

Create a pod on a kubernetes cluster.

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

If the pod will be deleted on completion

namespace

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

The namespace where the pod will be created

resume

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

If we try to reconnect to current pod if it exist

spec

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

Full spec yaml for a pod.

waitRunning

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

The maximum duration we need to wait until the pod complete.

waitUntilRunning

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

The maximum duration we need to wait until the pod is created.

This timeout is the maximum time that k8s scheduler take to

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

connection

The connection parameters to Kubernetes cluster

If no connection is defined, we try to load connection from current context in order below:

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

You can pass a full configuration with all option if needed

inputFiles

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

Input files are extra files supplied by user that make it simpler organize code.

Describe a files map that will be written and usable in execution context. In python execution context is in a temp folder, for bash scripts, you can reach files using a workingDir variable like 'source null/myfile.sh'

metadata

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

Full metadata yaml for a pod.

outputFiles

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

Output file list that will be uploaded to internal storage

List of key that will generate temporary files. On the command, just can use with special variable named outputFiles.key. If you add a files with ["first"], you can use the special vars echo 1 >> {[ outputFiles.first }} and you used on others tasks using null

Outputs

metadata

The full pod metadata

outputFiles

  • Type: object
  • SubType: string

The output files uri in Kestra internal storage

status

The full pod status

vars

  • Type: object

The value extract from output of the commands

Definitions

Connection

apiVersion

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

The api version of API to use

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 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 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 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

ContainerState

running

terminated

waiting

PodCondition

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:

Metadata

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:

Creation datetime

deletionGracePeriodSeconds

  • Type: integer
  • Dynamic:
  • Required:

Deletetion grace period in seconds

deletionTimestamp

  • Type: string
  • Dynamic:
  • Required:

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

OAuthTokenProvider

output

  • Type: string
  • Dynamic:
  • Required:

task

  • Type: Task
  • Dynamic:
  • Required:

OwnerReference

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:

ContainerStateTerminated

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:

ManagedFieldsEntry

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:

PodStatus

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

  • Type: array
  • SubType: PodIP
  • Dynamic:
  • Required:

qosClass

  • Type: string
  • Dynamic:
  • Required:

reason

  • Type: string
  • Dynamic:
  • Required:

startTime

  • Type: string
  • Dynamic:
  • Required:

ContainerStateRunning

startedAt

  • Type: string
  • Dynamic:
  • Required:

ContainerStatus

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:

restartCount

  • Type: integer
  • Dynamic:
  • Required:

started

  • Type: boolean
  • Dynamic:
  • Required:

state

ContainerStateWaiting

message

  • Type: string
  • Dynamic:
  • Required:

reason

  • Type: string
  • Dynamic:
  • Required:

PodIP

ip

  • Type: string
  • Dynamic:
  • Required: