Octopus.KubernetesDeployService exported 2026-07-22 by Octopus Deploy belongs to ‘Kubernetes’ category.
Deploy a service resource to Kubernetes.
Parameters
When this step is included in a project’s deployment process, the parameters below can be set.
Service Name
Octopus.Action.KubernetesContainers.ServiceName (required)
The name of the Kubernetes service resource.
Example: my-service
Service Type
Octopus.Action.KubernetesContainers.ServiceType (required)
The type of the Kubernetes service.
Allowed values: ClusterIP, NodePort, LoadBalancer, ExternalName
Default: ClusterIP
Service Ports
Octopus.Action.KubernetesContainers.ServicePorts
The service port mappings including name, port, target port, node port, and protocol. Provided as a JSON array.
Cluster IP
Octopus.Action.KubernetesContainers.ServiceClusterIp
The cluster IP address of the service.
Load Balancer IP
Octopus.Action.KubernetesContainers.ServiceLoadBalancerIp
The load balancer IP address of the service.
Service Annotations
Octopus.Action.KubernetesContainers.LoadBalancerAnnotations
Annotations associated with the Kubernetes service. Provided as a JSON object of key-value pairs.
Service Labels
Octopus.Action.KubernetesContainers.DeploymentLabels
Labels applied to the service resource. Labels are optional name/value pairs. Provided as a JSON object.
Service Selector Labels
Octopus.Action.KubernetesContainers.SelectorLabels
Selector labels used to match the pods that traffic will be sent to. Provided as a JSON object of key-value pairs.
Namespace
Octopus.Action.KubernetesContainers.Namespace
The Kubernetes namespace for the service.
Resource Status Check
Octopus.Action.Kubernetes.ResourceStatusCheck
Whether to verify that the service reached its 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
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-k8s-service" {
name = "Deploy K8s Service"
properties = {
Octopus.Action.TargetRoles = "k8s-cluster"
}
action {
action_type = "Octopus.KubernetesDeployService"
properties = {
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.Namespace = "default"
Octopus.Action.KubernetesContainers.ServiceName = "my-service"
Octopus.Action.KubernetesContainers.ServicePorts = "[{\"name\":\"http\",\"port\":\"80\",\"targetPort\":\"80\"}]"
Octopus.Action.KubernetesContainers.ServiceType = "ClusterIP"
Octopus.Action.RunOnServer = "false"
}
}
} Page updated on Wednesday, July 22, 2026