Commands Commands
Commands Certified

Execute Python files and commands.

yaml
type: io.kestra.plugin.scripts.python.Commands
yaml
id: python_venv
namespace: company.team

inputs:
  - id: nr
    type: INT
    defaults: 21

tasks:
  - id: python
    type: io.kestra.plugin.scripts.python.Commands
    namespaceFiles:
      enabled: true
      folderPerNamespace: true
      namespaces:
        - company
        - company.team
        - company.team.project # Explicitly name all namespaces to include; by default only the flow namespace is loaded.
      include:
        - etl_script.py
    taskRunner:
      type: io.kestra.plugin.core.runner.Process
    beforeCommands:
      - uv venv --python 3.13
      - uv pip install requests
    commands:
      - python etl_script.py --num {{inputs.nr}}

yaml
id: python_commands_example
namespace: company.team

tasks:
  - id: wdir
    type: io.kestra.plugin.core.flow.WorkingDirectory
    tasks:
      - id: clone_repository
        type: io.kestra.plugin.git.Clone
        url: https://github.com/kestra-io/examples
        branch: main

      - id: git_python_scripts
        type: io.kestra.plugin.scripts.python.Commands
        containerImage: ghcr.io/kestra-io/pydata:latest
        beforeCommands:
          - pip install faker > /dev/null
        commands:
          - python examples/scripts/etl_script.py
          - python examples/scripts/generate_orders.py
        outputFiles:
          - orders.csv

  - id: load_csv_to_s3
    type: io.kestra.plugin.aws.s3.Upload
    accessKeyId: "{{ secret('AWS_ACCESS_KEY_ID') }}"
    secretKeyId: "{{ secret('AWS_SECRET_KEY_ID') }}"
    region: eu-central-1
    bucket: kestraio
    key: stage/orders.csv
    from: "{{ outputs.gitPythonScripts.outputFiles['orders.csv'] }}"

yaml
id: gpu_task
namespace: company.team

tasks:
  - id: python
    type: io.kestra.plugin.scripts.python.Commands
    taskRunner:
      type: io.kestra.plugin.core.runner.Process
    commands:
      - python ml_on_gpu.py
    workerGroup:
      key: gpu

yaml
id: python_input_as_env_variable
namespace: company.team

inputs:
  - id: uri
    type: URI
    defaults: https://www.google.com/

tasks:
  - id: code
    type: io.kestra.plugin.scripts.python.Commands
    taskRunner:
      type: io.kestra.plugin.scripts.runner.docker.Docker
    containerImage: ghcr.io/kestra-io/pydata:latest
    inputFiles:
      main.py: |
          import requests
          import os

          # Perform the GET request
          response = requests.get(os.environ['URI'])

          # Check if the request was successful
          if response.status_code == 200:
              # Print the content of the page
              print(response.text)
          else:
              print(f"Failed to retrieve the webpage. Status code: {response.status_code}")
    env:
      URI: "{{ inputs.uri }}"
    commands:
      - python main.py

yaml
id: s3_trigger_commands
namespace: company.team
description: process CSV file from S3 trigger

tasks:
  - id: wdir
    type: io.kestra.plugin.core.flow.WorkingDirectory
    tasks:
      - id: clone_repository
        type: io.kestra.plugin.git.Clone
        url: https://github.com/kestra-io/examples
        branch: main

      - id: python
        type: io.kestra.plugin.scripts.python.Commands
        inputFiles:
          data.csv: "{{ trigger.objects | jq('.[].uri') | first }}"
        description: this script reads a file `data.csv` from S3 trigger
        containerImage: ghcr.io/kestra-io/pydata:latest
        commands:
          - python examples/scripts/clean_messy_dataset.py
        outputFiles:
          - "*.csv"
          - "*.parquet"

triggers:
  - id: wait_for_s3_object
    type: io.kestra.plugin.aws.s3.Trigger
    bucket: declarative-orchestration
    maxKeys: 1
    interval: PT1S
    filter: FILES
    action: MOVE
    prefix: raw/
    moveTo:
      key: archive/raw/
    accessKeyId: "{{ secret('AWS_ACCESS_KEY_ID') }}"
    secretKeyId: "{{ secret('AWS_SECRET_KEY_ID') }}"
    region: "{{ secret('AWS_DEFAULT_REGION') }}"

yaml
id: python_in_container
namespace: company.team

tasks:
  - id: wdir
    type: io.kestra.plugin.core.flow.WorkingDirectory
    tasks:
      - id: clone_repository
        type: io.kestra.plugin.git.Clone
        url: https://github.com/kestra-io/examples
        branch: main

      - id: git_python_scripts
        type: io.kestra.plugin.scripts.python.Commands
        commands:
          - python examples/scripts/etl_script.py
        outputFiles:
          - "*.csv"
          - "*.parquet"
        containerImage: annageller/kestra:latest
        taskRunner:
          type: io.kestra.plugin.scripts.runner.docker.Docker
          config: |
            {
              "auths": {
                  "https://index.docker.io/v1/": {
                      "username": "annageller",
                      "password": "{{ secret('DOCKER_PAT') }}"
                  }
              }
            }

yaml
id: script_in_venv
namespace: company.team
tasks:
  - id: python
    type: io.kestra.plugin.scripts.python.Commands
    packageManager: UV
    inputFiles:
      main.py: |
        import requests
        from kestra import Kestra

        response = requests.get('https://google.com')
        print(response.status_code)
        Kestra.outputs({'status': response.status_code, 'text': response.text})
    beforeCommands:
      - python -m venv venv
      - . venv/bin/activate
      - pip install requests kestra > /dev/null
    commands:
      - python main.py
Properties
SubTypestring
SubTypestring
Defaultpython:3.13-slim
SubTypestring
Defaulttrue
SubTypestring
Defaulttrue
SubTypestring
Default["/bin/sh","-c"]
Definitions
enabledbooleanstring
Defaulttrue
excludearray
SubTypestring
folderPerNamespacebooleanstring
Defaultfalse
ifExistsstring
DefaultOVERWRITE
Possible Values
OVERWRITEFAILWARNIGNORE
includearray
SubTypestring
namespacesarray
SubTypestring
Default["{{flow.namespace}}"]
SubTypestring
DefaultUV
Possible Values
PIPUV
DefaultAUTO
Possible Values
LINUXWINDOWSAUTO
Definitions
Example
yaml
id: simple_shell_example
namespace: company.team

tasks:
  - id: shell
    type: io.kestra.plugin.scripts.shell.Commands
    taskRunner:
      type: io.kestra.plugin.scripts.runner.docker.Docker
    commands:
    - echo "Hello World"

yaml
id: shell_example_with_files
namespace: company.team

inputs:
  - id: file
    type: FILE

tasks:
  - id: shell
    type: io.kestra.plugin.scripts.shell.Commands
    inputFiles:
      data.txt: "{{ inputs.file }}"
    outputFiles:
      - "*.txt"
    containerImage: centos
    taskRunner:
      type: io.kestra.plugin.scripts.runner.docker.Docker
    commands:
    - cp {{ workingDir }}/data.txt {{ workingDir }}/out.txt

yaml
id: allocate_memory_to_python_script
namespace: company.team

tasks:
  - id: script
    type: io.kestra.plugin.scripts.python.Script
    taskRunner:
      type: io.kestra.plugin.scripts.runner.docker.Docker
      pullPolicy: IF_NOT_PRESENT
      cpu:
        cpus: 1
      memory: 
        memory: "512Mb"
    containerImage: ghcr.io/kestra-io/kestrapy:latest
    script: |
      from kestra import Kestra
      
      data = dict(message="Hello from Kestra!")
      Kestra.outputs(data)
type*Requiredobject
configstringobject
cpu
cpusnumberstring
credentials
authstring
identityTokenstring
passwordstring
registrystring
registryTokenstring
usernamestring
deletebooleanstring
Defaulttrue
deviceRequestsarray
capabilitiesarray
SubTypearray
countintegerstring
deviceIdsarray
SubTypestring
driverstring
optionsobject
SubTypestring
entryPointarray
SubTypestring
Default[ "" ]
extraHostsarray
SubTypestring
fileHandlingStrategystring
DefaultVOLUME
Possible Values
MOUNTVOLUME
hoststring
killGracePeriodstring
DefaultPT0S
Formatduration
memory
kernelMemorystring
memorystring
memoryReservationstring
memorySwapstring
memorySwappinessstring
oomKillDisablebooleanstring
networkModestring
portBindingsarray
SubTypestring
privilegedbooleanstring
pullPolicyobject
resumebooleanstring
Defaulttrue
shmSizestring
userstring
versionstring
volumesarray
SubTypestring
waitbooleanstring
Defaulttrue
Example
yaml
id: new_shell
namespace: company.team

tasks:
  - id: shell
    type: io.kestra.plugin.scripts.shell.Commands
    taskRunner:
      type: io.kestra.plugin.core.runner.Process
    commands:
      - echo "Hello World"

yaml
id: before_commands_example
namespace: company.team

inputs:
  - id: url
    type: URI
    defaults: https://jsonplaceholder.typicode.com/todos/1

tasks:
  - id: transform
    type: io.kestra.plugin.scripts.python.Script
    taskRunner:
      type: io.kestra.plugin.core.runner.Process
    beforeCommands:
      - pip install kestra requests --break-system-packages
    script: |
      import requests
      from kestra import Kestra

      url = "{{ inputs.url }}"

      response = requests.get(url)
      print('Status Code:', response.status_code)
      Kestra.outputs(response.json())

yaml
id: new_shell_with_file
namespace: company.team

inputs:
  - id: file
    type: FILE

tasks:
  - id: shell
    type: io.kestra.plugin.scripts.shell.Commands
    inputFiles:
      data.txt: "{{inputs.file}}"
    outputFiles:
      - out.txt
    taskRunner:
      type: io.kestra.plugin.core.runner.Process
    commands:
      - cp {{workingDir}}/data.txt {{workingDir}}/out.txt
type*Requiredobject
versionstring
Example
yaml
id: new_shell
namespace: company.team

tasks:
  - id: shell
    type: io.kestra.plugin.scripts.shell.Commands
    taskRunner:
      type: io.kestra.plugin.ee.azure.runner.Batch
      account: "{{secrets.account}}"
      accessKey: "{{secrets.accessKey}}"
      endpoint: "{{secrets.endpoint}}"
      poolId: "{{vars.poolId}}"
    commands:
      - echo "Hello World"

yaml
id: new_shell_with_file
namespace: company.team

inputs:
  - id: file
    type: FILE

tasks:
  - id: shell
    type: io.kestra.plugin.scripts.shell.Commands
    inputFiles:
      data.txt: "{{inputs.file}}"
    outputFiles:
      - out.txt
    containerImage: centos
    taskRunner:
      type: io.kestra.plugin.azure.ee.runner.Batch
      account: "{{secrets.account}}"
      accessKey: "{{secrets.accessKey}}"
      endpoint: "{{secrets.endpoint}}"
      poolId: "{{vars.poolId}}"
      blobStorage:
        connectionString: "{{secrets.connectionString}}"
        containerName: "{{vars.containerName}}"
    commands:
      - cp {{workingDir}}/data.txt {{workingDir}}/out.txt

yaml
id: azure_batch_runner
namespace: company.team

variables:
  pool_id: poolId
  container_name: containerName

tasks:
  - id: scrape_environment_info
    type: io.kestra.plugin.scripts.python.Commands
    containerImage: ghcr.io/kestra-io/pydata:latest
    taskRunner:
      type: io.kestra.plugin.ee.azure.runner.Batch
      account: "{{ secret('AZURE_ACCOUNT') }}"
      accessKey: "{{ secret('AZURE_ACCESS_KEY') }}"
      endpoint: "{{ secret('AZURE_ENDPOINT') }}"
      poolId: "{{ vars.pool_id }}"
      blobStorage:
        containerName: "{{ vars.container_name }}"
        connectionString: "{{ secret('AZURE_CONNECTION_STRING') }}"
    commands:
      - python {{ workingDir }}/main.py
    namespaceFiles:
      enabled: true
    outputFiles:
      - environment_info.json
    inputFiles:
      main.py: |
        import platform
        import socket
        import sys
        import json

        from kestra import Kestra

        print("Hello from Azure Batch and kestra!")

        def print_environment_info():
            print(f"Host's network name: {platform.node()}")
            print(f"Python version: {platform.python_version()}")
            print(f"Platform information (instance type): {platform.platform()}")
            print(f"OS/Arch: {sys.platform}/{platform.machine()}")

            env_info = {
                "host": platform.node(),
                "platform": platform.platform(),
                "OS": sys.platform,
                "python_version": platform.python_version(),
            }
            Kestra.outputs(env_info)

            filename = 'environment_info.json'
            with open(filename, 'w') as json_file:
                json.dump(env_info, json_file, indent=4)

        if __name__ == '__main__':
          print_environment_info()
account*Requiredstring
endpoint*Requiredstring
poolId*Requiredstring
type*Requiredobject
Possible Values
io.kestra.plugin.ee.azure.runner.Batchio.kestra.plugin.azure.runner.Batch
accessKeystring
blobStorage
containerName*Requiredstring
connectionStringstring
endpointstring
sharedKeyAccountAccessKeystring
sharedKeyAccountNamestring
completionCheckIntervalstring
DefaultPT5S
deletebooleanstring
Defaulttrue
registry
identityReference
resourceIdstring
passwordstring
registryServerstring
userNamestring
resumebooleanstring
Defaulttrue
streamLogsbooleanstring
Defaultfalse
syncWorkingDirectorybooleanstring
Defaultfalse
versionstring
waitUntilCompletionstring
DefaultPT1H
Example
yaml
id: run_container
namespace: company.team

variables:
  region: eu-west-2
  computeEnvironmentArn: "arn:aws:batch:eu-central-1:123456789012:compute-environment/kestraFargateEnvironment"

tasks:
  - id: shell
    type: io.kestra.plugin.scripts.shell.Commands
    taskRunner:
      type: io.kestra.plugin.ee.aws.runner.Batch
      accessKeyId: "{{ secret('AWS_ACCESS_KEY_ID') }}"
      secretKeyId: "{{ secret('AWS_SECRET_KEY_ID') }}"
      region: "{{ vars.region }}"
      computeEnvironmentArn: "{{ vars.computeEnvironmentArn }}"
    commands:
      - echo "Hello World"

yaml
id: container_with_input_files
namespace: company.team

inputs:
  - id: file
    type: FILE

variables:
  region: eu-west-2
  computeEnvironmentArn: "arn:aws:batch:eu-central-1:123456789012:compute-environment/kestraFargateEnvironment"

tasks:
  - id: shell
    type: io.kestra.plugin.scripts.shell.Commands
    inputFiles:
      data.txt: "{{ inputs.file }}"
    outputFiles:
      - out.txt
    containerImage: centos
    taskRunner:
      type: io.kestra.plugin.ee.aws.runner.Batch
      accessKeyId: "{{ secret('AWS_ACCESS_KEY_ID') }}"
      secretKeyId: "{{ secret('AWS_SECRET_KEY_ID') }}"
      region: "{{ vars.region }}"
      bucket: "{{ vars.bucket }}"
      computeEnvironmentArn: "{{ vars.computeEnvironmentArn }}"
    commands:
      - cp {{ workingDir }}/data.txt {{ workingDir }}/out.txt

yaml
id: aws_batch_runner
namespace: company.team

variables:
  compute_environment_arn: arn:aws:batch:us-east-1:123456789:compute-environment/kestra
  job_queue_arn: arn:aws:batch:us-east-1:123456789:job-queue/kestra
  execution_role_arn: arn:aws:iam::123456789:role/ecsTaskExecutionRole
  task_role_arn: arn:aws:iam::123456789:role/ecsTaskRole

tasks:
  - id: send_data
    type: io.kestra.plugin.scripts.python.Script
    containerImage: ghcr.io/kestra-io/pydata:latest
    taskRunner:
      type: io.kestra.plugin.ee.aws.runner.Batch
      region: us-east-1
      accessKeyId: "{{ secret('AWS_ACCESS_KEY_ID') }}"
      secretKeyId: "{{ secret('AWS_SECRET_KEY_ID') }}"
      computeEnvironmentArn: "{{ vars.compute_environment_arn }}"
      jobQueueArn: "{{ vars.job_queue_arn}}"
      executionRoleArn: "{{ vars.execution_role_arn }}"
      taskRoleArn: "{{ vars.task_role_arn }}"
      bucket: kestra-us
    script: |
      import platform
      import socket
      import sys

      print("Hello from AWS Batch and kestra!")

      def print_environment_info():
          print(f"Host's network name: {platform.node()}")
          print(f"Python version: {platform.python_version()}")
          print(f"Platform information (instance type): {platform.platform()}")
          print(f"OS/Arch: {sys.platform}/{platform.machine()}")

          try:
              hostname = socket.gethostname()
              ip_address = socket.gethostbyname(hostname)
              print(f"Host IP Address: {ip_address}")
          except socket.error as e:
              print("Unable to obtain IP address.")

      if __name__ == '__main__':
          print_environment_info()
computeEnvironmentArn*Requiredstring
region*Requiredstring
type*Requiredobject
accessKeyIdstring
bucketstring
completionCheckIntervalstring
DefaultPT5S
deletebooleanstring
Defaulttrue
endpointOverridestring
executionRoleArnstring
jobQueueArnstring
resources
Default{ "request": { "memory": "2048", "cpu": "1" } }
request*Required
cpu*Requiredstring
memory*Requiredstring
resumebooleanstring
Defaulttrue
secretKeyIdstring
sessionTokenstring
sidecarResources
request*Required
cpu*Requiredstring
memory*Requiredstring
stsEndpointOverridestring
stsRoleArnstring
stsRoleExternalIdstring
stsRoleSessionDurationstring
DefaultPT15M
stsRoleSessionNamestring
syncWorkingDirectorybooleanstring
Defaultfalse
taskRoleArnstring
versionstring
waitUntilCompletionstring
DefaultPT1H
Example
yaml
id: new_shell
namespace: company.team

variables:
  projectId: "myproject"
  region: "europe-west2"

tasks:
  - id: shell
    type: io.kestra.plugin.scripts.shell.Commands
    taskRunner:
      type: io.kestra.plugin.ee.gcp.runner.Batch
      projectId: "{{vars.projectId}}"
      region: "{{ vars.region} }"
      serviceAccount: "{{ secret('GOOGLE_SA') }}"
    commands:
      - echo "Hello World"

yaml
id: new_shell_with_file
namespace: company.team

inputs:
  - id: file
    type: FILE

variables:
  projectId: "myProject"
  region: "europe-west2"
  bucket: "myBucket"

tasks:
  - id: shell
    type: io.kestra.plugin.scripts.shell.Commands
    inputFiles:
      data.txt: "{{ inputs.file }}"
    outputFiles:
      - out.txt
    containerImage: centos
    taskRunner:
      type: io.kestra.plugin.ee.gcp.runner.Batch
      projectId: "{{ vars.projectId }}"
      region: "{{ vars.region }}"
      bucket: "{{ vars.bucket }}"
      serviceAccount: "{{ secret('GOOGLE_SA') }}"
    commands:
      - cp {{workingDir}}/data.txt {{workingDir}}/out.txt

yaml
id: gcp_batch_runner
namespace: company.team

tasks:
  - id: scrape_environment_info
    type: io.kestra.plugin.scripts.python.Commands
    containerImage: ghcr.io/kestra-io/pydata:latest
    taskRunner:
      type: io.kestra.plugin.ee.gcp.runner.Batch
      projectId: "{{ secret('GCP_PROJECT_ID') }}"
      region: "europe-west9"
      bucket: "{{ secret('GCS_BUCKET')}}"
      serviceAccount: "{{ secret('GOOGLE_SA') }}"
    commands:
      - python {{ workingDir }}/main.py
    namespaceFiles:
      enabled: true
    outputFiles:
      - environment_info.json
    inputFiles:
      main.py: |
        import platform
        import socket
        import sys
        import json
        from kestra import Kestra

        print("Hello from GCP Batch and kestra!")

        def print_environment_info():
            print(f"Host's network name: {platform.node()}")
            print(f"Python version: {platform.python_version()}")
            print(f"Platform information (instance type): {platform.platform()}")
            print(f"OS/Arch: {sys.platform}/{platform.machine()}")

            env_info = {
                "host": platform.node(),
                "platform": platform.platform(),
                "OS": sys.platform,
                "python_version": platform.python_version(),
            }
            Kestra.outputs(env_info)

            filename = '{{ workingDir }}/environment_info.json'
            with open(filename, 'w') as json_file:
                json.dump(env_info, json_file, indent=4)

        if __name__ == '__main__':
          print_environment_info()
region*Requiredstring
type*Requiredobject
Possible Values
io.kestra.plugin.ee.gcp.runner.Batchio.kestra.plugin.gcp.runner.Batch
bucketstring
completionCheckIntervalstring
DefaultPT5S
computeResource
bootDiskstring
cpustring
memorystring
deletebooleanstring
Defaulttrue
entryPointarray
SubTypestring
impersonatedServiceAccountstring
lifecyclePoliciesarray
actionstring
Possible Values
ACTION_UNSPECIFIEDRETRY_TASKFAIL_TASKUNRECOGNIZED
actionCondition
exitCodesarray
SubTypeinteger
machineTypestring
Defaulte2-medium
maxCreateJobRetryCountintegerstring
Default2
maxRetryCountinteger
Minimum>= 0
Maximum<= 10
networkInterfacesarray
network*Requiredstring
subnetworkstring
projectIdstring
reservationstring
resumebooleanstring
Defaulttrue
scopesarray
SubTypestring
Default["https://www.googleapis.com/auth/cloud-platform"]
serviceAccountstring
syncWorkingDirectorybooleanstring
Defaultfalse
versionstring
waitForLogIntervalstring
DefaultPT5S
waitUntilCompletionstring
DefaultPT1H
Example
yaml
id: new-shell
namespace: company.team

variables:
  projectId: "projectId"
  region: "europe-west2"

tasks:
  - id: shell
    type: io.kestra.plugin.scripts.shell.Commands
    taskRunner:
      type: io.kestra.plugin.ee.gcp.runner.CloudRun
      projectId: "{{ vars.projectId }}"
      region: "{{ vars.region }}"
      serviceAccount: "{{ secret('GOOGLE_SA') }}"
    commands:
      - echo "Hello World"

yaml
id: new-shell-with-file
namespace: company.team

inputs:
  - id: file
    type: FILE

variables:
  projectId: "projectId"
  bucket: "bucket"
  region: "europe-west2"

tasks:
  - id: shell
    type: io.kestra.plugin.scripts.shell.Commands
    inputFiles:
      data.txt: "{{ inputs.file }}"
    outputFiles:
      - out.txt
    containerImage: centos
    taskRunner:
      type: io.kestra.plugin.ee.gcp.runner.CloudRun
      projectId: "{{ vars.projectId }}"
      region: "{{ vars.region }}"
      bucket: "{{ vars.bucket }}"
      serviceAccount: "{{ secret('GOOGLE_SA') }}"
    commands:
      - cp {{ workingDir }}/data.txt {{ workingDir }}/out.txt

yaml
id: shell-direct-vpc-egress
namespace: company.team

variables:
  projectId: "projectId"
  region: "europe-west1"
  network: "projects/projectId/global/networks/my-vpc"
  subnetwork: "projects/projectId/regions/europe-west1/subnetworks/my-subnet"

tasks:
  - id: shell
    type: io.kestra.plugin.scripts.shell.Commands
    taskRunner:
      type: io.kestra.plugin.ee.gcp.runner.CloudRun
      projectId: "{{ vars.projectId }}"
      region: "{{ vars.region }}"
      network: "{{ vars.network }}"
      subnetwork: "{{ vars.subnetwork }}"
      vpcEgress: ALL_TRAFFIC
      serviceAccount: "{{ secret('GOOGLE_SA') }}"
    commands:
      - echo "Hello from Direct VPC Egress"
region*Requiredstring
type*Requiredobject
Possible Values
io.kestra.plugin.ee.gcp.runner.CloudRunio.kestra.plugin.gcp.runner.CloudRun
bucketstring
completionCheckIntervalstring
DefaultPT5S
deletebooleanstring
Defaulttrue
impersonatedServiceAccountstring
maxRetriesintegerstring
Default3
networkstring
projectIdstring
resources
cpustring
memorystring
resumebooleanstring
Defaulttrue
runtimeServiceAccountstring
scopesarray
SubTypestring
Default["https://www.googleapis.com/auth/cloud-platform"]
serviceAccountstring
subnetworkstring
syncWorkingDirectorybooleanstring
versionstring
vpcAccessConnectorstring
vpcEgressstring
Possible Values
VPC_EGRESS_UNSPECIFIEDALL_TRAFFICPRIVATE_RANGES_ONLYUNRECOGNIZED
waitForLogIntervalstring
DefaultPT5S
waitUntilCompletionstring
DefaultPT1H
Example
yaml
id: new-shell
namespace: company.team

tasks:
  - id: shell
    type: io.kestra.plugin.scripts.shell.Commands
    taskRunner:
      type: io.kestra.plugin.ee.kubernetes.runner.Kubernetes
    commands:
      - echo "Hello World"

yaml
id: new-shell-with-file
namespace: company.team

inputs:
  - id: file
    type: FILE

tasks:
  - id: shell
    type: io.kestra.plugin.scripts.shell.Commands
    inputFiles:
      data.txt: "{{ inputs.file }}"
    outputFiles:
      - out.txt
    containerImage: centos
    taskRunner:
      type: io.kestra.plugin.ee.kubernetes.runner.Kubernetes
    commands:
      - cp {{ workingDir }}/data.txt {{ workingDir }}/out.txt
type*Requiredobject
Possible Values
io.kestra.plugin.ee.kubernetes.runner.Kubernetesio.kestra.plugin.kubernetes.runner.Kubernetes
config
apiVersionstring
Defaultv1
caCertDatastring
caCertFilestring
clientCertDatastring
clientCertFilestring
clientKeyAlgostring
DefaultRSA
clientKeyDatastring
clientKeyFilestring
clientKeyPassphrasestring
disableHostnameVerificationbooleanstring
keyStoreFilestring
keyStorePassphrasestring
masterUrlstring
Defaulthttps://kubernetes.default.svc
namespacestring
oauthTokenstring
oauthTokenProvider
outputstring
task
passwordstring
trustCertsbooleanstring
trustStoreFilestring
trustStorePassphrasestring
usernamestring
containerDefaultSpecobject
containerSpecobject
deletebooleanstring
Defaulttrue
fileSideCarSpecobject
fileSidecar
Default{ "image": "busybox" }
defaultSpecobject
imagestring
Defaultbusybox
resourcesobject
killed
Defaultfalse
labelsobject
namespacestring
Defaultdefault
nodeSelectorobject
podSpecobject
pullPolicystring
DefaultALWAYS
Possible Values
IF_NOT_PRESENTALWAYSNEVER
resources
limit
cpustring
memorystring
request
cpustring
memorystring
resumebooleanstring
Defaulttrue
serviceAccountNamestring
syncWorkingDirectorybooleanstring
Defaultfalse
versionstring
waitForLogsstring
DefaultPT30S
waitUntilCompletionstring
DefaultPT1H
waitUntilRunningstring
DefaultPT10M
Default0
SubTypestring
Definitions