> 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

Configure settings and permissions for the CD Canary Deployment step.

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

***

## What you will learn from this topic

* Which [workloads you can deploy](#what-workloads-can-i-deploy) with the Canary Deployment step
* How to configure [Instances](#instances), [Timeout](#timeout), and [Skip Dry Run](#skip-dry-run) settings
* How to [configure traffic routing](#traffic-routing-configuration) for a Canary deployment

***

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

Go to [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) for the supported workload types.

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

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

Go to [Create a Kubernetes Canary Deployment](/continuous-delivery/use-continuous-delivery/deploy-services-on-different-platforms/kubernetes/kubernetes-executions/create-a-kubernetes-canary-deployment.md) for a full walkthrough of this step.

**Example YAML:**

```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**, and then 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, if 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 actually sending it.

If the **Skip Dry Run** option is selected, Harness does 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, go to [Traffic Routing Step Reference](/continuous-delivery/use-continuous-delivery/deploy-services-on-different-platforms/kubernetes/cd-k8s-ref/traffic-shifting-step.md).

***

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

Go to the following topics for these settings:

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

***

## Next steps <a href="#next-steps" id="next-steps"></a>

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

{% @harness-feedback/feedback %}
