Deploy Kubernetes YAML

Octopus.KubernetesDeployRawYaml exported 2026-07-22 by Octopus Deploy belongs to ‘Kubernetes’ category.

Deploy raw YAML resources to Kubernetes from inline YAML, a package, or a Git repository.

Parameters

When this step is included in a project’s deployment process, the parameters below can be set.

YAML Source

Octopus.Action.Script.ScriptSource (required)

The source of the Kubernetes resources. Can be inline YAML, from a package, or from a Git repository.

Allowed values: Inline, Package, GitRepository

Default: GitRepository

YAML content

Octopus.Action.KubernetesContainers.CustomResourceYaml

The inline YAML content to deploy when the source is set to Inline.

Kubernetes YAML file paths

Octopus.Action.KubernetesContainers.CustomResourceYamlFileName

The path(s) to the YAML file(s) in the package or Git repository. Supports glob patterns and newline-separated paths.

Example: manifests/**/*.yaml

Git Repository Source

Octopus.Action.GitRepository.Source

The source of the Git repository. Can be the Project repository or an External repository.

Allowed values: Project, External

Namespace

Octopus.Action.KubernetesContainers.Namespace

The Kubernetes namespace for the deployment.

Resource Status Check

Octopus.Action.Kubernetes.ResourceStatusCheck

Whether to verify that Kubernetes objects reached their desired state after deployment.

Allowed values: True, False

Default: True

Step Timeout

Octopus.Action.Kubernetes.DeploymentTimeout

The maximum time in seconds the step is allowed to run before being terminated.

Default: 180

Wait for Jobs

Octopus.Action.Kubernetes.WaitForJobs

Whether to wait for Kubernetes Jobs to complete during the step.

Allowed values: True, False

Default: False

Server-Side Apply

Octopus.Action.Kubernetes.ServerSideApply.Enabled

Whether to use server-side apply (—server-side) when calling kubectl apply.

Allowed values: True, False

Default: True

Force Conflicts

Octopus.Action.Kubernetes.ServerSideApply.ForceConflicts

Whether to forcefully overwrite conflicts (—force-conflicts) when using server-side apply.

Allowed values: True, False

Default: True

Step configuration using OCL

Example in Octopus Configuration Language (OCL):

step "deploy-raw-yaml" {
    name = "Deploy Raw YAML"
    properties = {
        Octopus.Action.TargetRoles = "k8s-cluster"
    }

    action {
        action_type = "Octopus.KubernetesDeployRawYaml"
        properties = {
            Octopus.Action.GitRepository.Source = "Project"
            Octopus.Action.Kubernetes.DeploymentTimeout = "180"
            Octopus.Action.Kubernetes.ResourceStatusCheck = "True"
            Octopus.Action.Kubernetes.ServerSideApply.Enabled = "True"
            Octopus.Action.Kubernetes.ServerSideApply.ForceConflicts = "True"
            Octopus.Action.KubernetesContainers.CustomResourceYamlFileName = "manifests/*.yaml"
            Octopus.Action.KubernetesContainers.Namespace = "default"
            Octopus.Action.RunOnServer = "false"
            Octopus.Action.Script.ScriptSource = "GitRepository"
        }
    }
}

Page updated on Wednesday, July 22, 2026