Restart
Trigger a rolling restart of one or multiple Kubernetes resources (Deployment, DaemonSet, StatefulSet).
type: "io.kestra.plugin.kubernetes.kubectl.Restart"Examples
Trigger a rolling restart of a StatefulSet named 'api' (equivalent to kubectl rollout restart statefulset api).
id: restart_api
namespace: company.team
tasks:
- id: restart
type: io.kestra.plugin.kubernetes.kubectl.Restart
namespace: api
resourceType: StatefulSet
resourcesNames:
- api
connection:
masterUrl: "{{ secret('MASTER_URL') }}"
caCertData: "{{ secret('CA_CERT_DATA') }}"
oauthToken: "{{ secret('OAUTH_TOKEN') }}"
Properties
namespace *Requiredstring
The Kubernetes namespace
resourceType *Requiredstring
DeploymentDaemonSetStatefulSetThe Kubernetes resource type (Deployment, DaemonSet, StatefulSet).
resourcesNames *Requiredarray
The Kubernetes resources names
apiGroup string
appsThe Kubernetes resource apiGroup
apiVersion string
v1The Kubernetes resource apiVersion
connection Non-dynamicConnection
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.
fileSidecar Non-dynamicSideCar
{
"image": "busybox"
}The configuration of the file sidecar container that handles the download and upload of files
inputFiles object
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.
outputFiles array
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..
waitRunning string
PT1HdurationThe maximum duration to wait for the job completion
waitUntilRunning string
PT10MdurationThe 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.
Definitions
io.kestra.plugin.kubernetes.models.Connection
apiVersion string
v1The API version
caCertData string
CA certificate as data
caCertFile string
CA certificate as file path
clientCertData string
Client certificate as data
clientCertFile string
Client certificate as a file path
clientKeyAlgo string
RSAClient key encryption algorithm
default is RSA
clientKeyData string
Client key as data
clientKeyFile string
Client key as a file path
clientKeyPassphrase string
Client key passphrase
disableHostnameVerification booleanstring
Disable hostname verification
keyStoreFile string
Key store file
keyStorePassphrase string
Key store passphrase
masterUrl string
https://kubernetes.default.svcThe URL to the Kubernetes API
namespace string
The namespace used
oauthToken string
Oauth token
oauthTokenProvider OAuthTokenProvider
Oauth token provider
password string
Password
trustCerts booleanstring
Trust all certificates
trustStoreFile string
Truststore file
trustStorePassphrase string
Truststore passphrase
username string
Username
io.kestra.plugin.kubernetes.models.SideCar
image string
busyboxThe image used for the file sidecar container
resources object
The resource requirements applied to the file sidecar container