YAML for Kubernetes Apply Deployment

View as Markdown

Apply Kubernetes manifests to a cluster using kubectl apply.

YAML parameters for Kubernetes Apply Deployment

PARAMETERS
config_pathrequiredstring
Path to the Kubernetes manifest files.
targetsrequired(string | TargetYaml)[]
Target Kubernetes clusters for deployment. Each item is a target definition or a filter matching existing targets by identifier: a plain string such as sd* (* as a wildcard) or an object with type: MATCH.
typerequiredstring

Value: KUBERNETES_APPLY

actionrequiredstring
Unique identifier for the action within the pipeline.
record_argstring enum
Whether to record the current kubectl command in the resource annotation.
Allowed enum:
TRUE,
FALSE,
NOT_SET
save_config_argboolean
If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.
overwrite_argboolean
Automatically resolve conflicts between the modified and live configuration by using values from the modified configuration.
cascade_argboolean
Only relevant during a prune or a force apply. If true, cascade the deletion of the resources managed by pruned or deleted resources (e.g. Pods created by a ReplicationController). Used with kubectl_version older than 1.20 or not set; newer versions use cascade.
cascadestring enum
Cascade deletion strategy passed as --cascade=<value>. Used with kubectl_version latest or 1.20 and newer; older versions use cascade_arg.
Allowed enum:
BACKGROUND,
ORPHAN,
FOREGROUND
all_argboolean
Defines whether to select all the specified resources.
grace_period_arginteger
Only relevant during a prune or a force apply. Period of time in seconds given to pruned or deleted resources to terminate gracefully. Ignored if negative.
prune_argboolean
Automatically delete resource objects that do not appear in the configs and are created by either apply or create --save-config. Should be used with either -l or --all.
prune_whitelist_argstring
Overwrite the default whitelist with <group/version/kind> for --prune.
force_argboolean
Delete and re-create the specified resource, when PATCH encounters conflict and has retried for 5 times.
validateboolean
Validates the configuration before applying
kubectl_versionstring
Version of kubectl to use.
trigger_timestring enum
Specifies when the action should be executed.
Allowed enum:
ON_EVERY_EXECUTION,
ON_FAILURE,
ON_BACK_TO_SUCCESS,
ON_WARNING,
ON_WAIT_FOR_APPROVE,
ON_TERMINATE
loopstring[]
The list of variables for dynamic action execution. The action runs once for each value.
run_only_on_first_failureboolean
When true, the action runs only on the first failure instead of on each failure. Used only when trigger_time is ON_FAILURE.
disabledboolean
When set to true the action is disabled. By default it is set to false.
timeoutinteger
The timeout in seconds. It cannot exceed the action time limit of the workspace plan; a higher value is rejected.
ignore_errorsboolean
If set to true the execution will proceed, mark action as a warning and jump to the next action. Doesn't apply to deployment actions.
retry_intervalinteger
Delay time between auto retries in seconds.
retry_countinteger
Number of retries if the action fails.

Constraints: ≤ 10

run_nextstring enum
Defines whether the action should run in parallel with the next one.
Allowed enum:
WAIT_ON_SUCCESS,
IN_SOFT_PARALLEL,
IN_HARD_PARALLEL
trigger_conditionsTriggerConditionYaml[]
The list of trigger conditions to meet so that the action can be triggered.
variablesVariableYaml[]
The list of variables you can use in the action.

Last modified on Nov 2, 2026

YAML examples for Kubernetes Apply Deployment

Deploy to Google Kubernetes Engine

yaml
- action: "Kubernetes - deployment apply"
  type: "KUBERNETES_APPLY"
  config_path: "config.yaml"
  validate: true
  record_arg: "NOT_SET"
  overwrite_arg: true
  save_config_arg: true
  force_arg: false
  kubectl_version: "latest"
  cascade: "FOREGROUND"
  grace_period_arg: 1
  targets:
    - target: my_gke_cluster
      type: GKE
      name: My GKE Cluster
      integration: my_integration
      cluster: cluster-1
      project: tokyo-house-138923
      zone: europe-west1-c

Deploy to self-managed Kubernetes cluster

yaml
- action: "Apply Deployment"
  type: "KUBERNETES_APPLY"
  config_path: config.yml
  cascade_arg: true
  grace_period_arg: 180
  kubectl_version: v1.19.0
  targets:
    - target: my_target_id
      auth:
        token: 'test-token'
        method: TOKEN
      name: my-target
      type: K8S_CLUSTER
      cluster: https://192.168.5.226:6443

Deploy to Amazon EKS cluster

yaml
- action: "Apply Deployment"
  type: "KUBERNETES_APPLY"
  config_path: "config.yaml"
  cascade_arg: true
  grace_period_arg: 0
  kubectl_version: "1.11.1"
  targets:
    - target: my_eks_cluster
      type: EKS
      name: My EKS Cluster
      integration: my_integration
      cluster: cluster-1
      region: us-west-2
      role_arn: arn:aws:iam::344123456789:role/EKS_TESTS

Deploy to Azure AKS cluster

yaml
- action: "Apply Deployment"
  type: "KUBERNETES_APPLY"
  config_path: "config.yaml"
  cascade_arg: true
  grace_period_arg: 0
  kubectl_version: "1.11.1"
  targets:
    - target: my_aks_cluster
      type: AKS
      name: My AKS Cluster
      integration: my_integration
      cluster: buddy-tests
      subscription: d4fd0732-1b7f-47ff-8ca9-8b003428dcd8
      resource_group: test-buddy_group

Deploy to DigitalOcean Kubernetes cluster

yaml
- action: "Apply Deployment"
  type: "KUBERNETES_APPLY"
  config_path: "config.yaml"
  cascade_arg: true
  grace_period_arg: 0
  kubectl_version: "1.11.1"
  targets:
    - target: my_doks_cluster
      type: DOKS
      name: My DOKS Cluster
      integration: my_integration
      cluster: 0ec55079-0398-4cfc-9b51-97e07cb07ae7

Apply and prune resources missing from the configuration

yaml
- action: "Apply and prune"
  type: "KUBERNETES_APPLY"
  config_path: "k8s/"
  prune_arg: true
  all_arg: true
  prune_whitelist_arg: "core/v1/ConfigMap"
  targets:
    - target: my_gke_cluster
      type: GKE
      name: My GKE Cluster
      integration: my_integration
      cluster: cluster-1
      project: tokyo-house-138923
      zone: europe-west1-c