> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/continuous-delivery/use-continuous-delivery/deploy-services-on-different-platforms/kubernetes/cd-k8s-ref/canary-deployment-step.md).

# Canary Deployment step

This topic provides settings and permissions for the CD **Canary Deployment** step.

### What Workloads Can I Deploy? <a href="#what-workloads-can-i-deploy" id="what-workloads-can-i-deploy"></a>

See [What Can I Deploy in Kubernetes?](/continuous-delivery/use-continuous-delivery/deploy-services-on-different-platforms/kubernetes/cd-k8s-ref/what-can-i-deploy-in-kubernetes.md)

### Canary Deployment <a href="#canary-deployment" id="canary-deployment"></a>

In this step, you will define how many pods are deployed for a Canary test of the configuration files in your Service Definition **Manifests** section.

See [Create a Kubernetes Canary Deployment](/continuous-delivery/use-continuous-delivery/deploy-services-on-different-platforms/kubernetes/kubernetes-executions/create-a-kubernetes-canary-deployment.md).

### YAML <a href="#yaml" id="yaml"></a>

```yaml
              - step:
                  type: K8sCanaryDeploy
                  name: Canary Deploy
                  identifier: Canary_Deploy
                  spec:
                    skipDryRun: false
                    instanceSelection:
                      type: Count
                      spec:
                        count: 1
                  timeout: 10m
```

### Name <a href="#name" id="name"></a>

Enter the name for the step.

### Instances <a href="#instances" id="instances"></a>

In **Instances**, select **Instance Count** or **Percentage**.

In **Instances**, enter the number of pods to deploy.

If you selected **Instance Count**, enter the number of pods.

If you selected **Percentage**, enter a percentage of the pods defined in your Service Definition **Manifests** files to deploy.

For example, in you have `replicas: 4` in a manifest in Service, and you enter **50** in **Instances**, then 2 pods are deployed in this Phase step.

### Timeout <a href="#timeout" id="timeout"></a>

How long Harness should run this step before failing it. Enter a minimum of 10m to account for network activity in your target environment.

### Skip Dry Run <a href="#skip-dry-run" id="skip-dry-run"></a>

By default, Harness uses the `--dry-run` flag on the `kubectl apply` command during the **Initialize** step of this command, which prints the object that would be sent to the cluster without really sending it.

If the **Skip Dry Run** option is selected, Harness will not use the `--dry-run` flag.

### Traffic Routing Configuration <a href="#traffic-routing-configuration" id="traffic-routing-configuration"></a>

For information on how to configure traffic routing for Canary deployments, see [Traffic Routing Step Reference](/continuous-delivery/use-continuous-delivery/deploy-services-on-different-platforms/kubernetes/cd-k8s-ref/traffic-shifting-step.md).

### Advanced <a href="#advanced" id="advanced"></a>

See the following topics for these settings:

* [Delegate Selector](/harness-ai/use-harness-platform/delegates/delegate/manage-delegates/select-delegates-with-selectors.md)
* [Conditional Execution](/harness-ai/use-harness-platform/pipelines/step-skip-condition-settings.md)
* [Failure Strategy](/harness-ai/use-harness-platform/pipelines/failure-handling/define-a-failure-strategy-on-stages-and-steps.md)
* [Looping Strategy](/harness-ai/use-harness-platform/pipelines/looping-strategies/looping-strategies-matrix-repeat-and-parallelism.md)
* [Policy Enforcement](/harness-ai/use-harness-platform/governance/policy-as-code/harness-governance-overview.md)

### See Also <a href="#see-also" id="see-also"></a>

* [Canary Delete Step](/continuous-delivery/use-continuous-delivery/deploy-services-on-different-platforms/kubernetes/cd-k8s-ref/kubernetes-canary-delete-step.md)
