Apply
yaml
type: "io.kestra.plugin.kubernetes.kubectl.apply"
Examples
yaml
id: create_or_replace_deployment
namespace: company.team
tasks:
- id: apply
type: io.kestra.plugin.kubernetes.kubectl.Apply
namespace: default
spec: |-
apiVersion: apps/v1
kind: Deployment
metadata:
name: mypod
yaml
id: create_or_replace_deployment
namespace: company.team
tasks:
- id: apply
type: io.kestra.plugin.kubernetes.kubectl.Apply
namespaceFiles:
enabled: true
namespace: default
spec: "{{ read('deployment.yaml') }}"
yaml
id: k8s
namespace: company.name
tasks:
- id: apply
type: io.kestra.plugin.kubernetes.kubectl.Apply
namespace: default
spec: |-
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: shirts.stable.example.com
spec:
group: stable.example.com
scope: Namespaced
names:
plural: shirts
singular: shirt
kind: Shirt
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
type: object
x-kubernetes-preserve-unknown-fields: true # Allows any fields in spec
properties:
# You should define your actual Shirt properties here later
# For example:
# color:
# type: string
# size:
# type: string
# enum: ["S", "M", "L", "XL"]
status:
type: object
x-kubernetes-preserve-unknown-fields: true # Allows any fields in status
properties:
# Define your status properties here
# message:
# type: string
Properties
spec *Requiredstring
connection Non-dynamicConnection
fileSidecar Non-dynamicSideCar
Default
{
"image": "busybox"
}
inputFiles object
SubType string
namespace string
outputFiles array
SubType string
waitRunning string
Default
PT1H
Format
duration
waitUntilRunning string
Default
PT10M
Format
duration
Definitions
io.kestra.plugin.kubernetes.models.Connection
apiVersion string
Default
v1
caCertData string
caCertFile string
clientCertData string
clientCertFile string
clientKeyAlgo string
Default
RSA
clientKeyData string
clientKeyFile string
clientKeyPassphrase string
disableHostnameVerification booleanstring
keyStoreFile string
keyStorePassphrase string
masterUrl string
Default
https://kubernetes.default.svc
namespace string
oauthToken string
oauthTokenProvider OAuthTokenProvider
password string
trustCerts booleanstring
trustStoreFile string
trustStorePassphrase string
username string
io.fabric8.kubernetes.api.model.FieldsV1
io.kestra.plugin.kubernetes.models.Metadata
annotations object
SubType string
clusterName string
creationTimestamp string
Format
date-time
deletionGracePeriodSeconds integer
deletionTimestamp string
Format
date-time
finalizers array
SubType string
generateName string
generation integer
labels object
SubType string
name string
namespace string
resourceVersion string
selfLink string
uid string
io.fabric8.kubernetes.api.model.ManagedFieldsEntry
apiVersion string
fieldsType string
fieldsV1 FieldsV1
manager string
operation string
subresource string
time string
io.kestra.plugin.kubernetes.models.SideCar
image string
Default
busybox