upgrade CLI command reference

Detailed information on the upgrade CLI command

Description

Upgrade or downgrade Dapr on supported hosting platforms.

Warning

Version steps should be done incrementally, including minor versions as you upgrade or downgrade.

Prior to downgrading, confirm components are backwards compatible and application code does ultilize APIs that are not supported in previous versions of Dapr.

Supported platforms

Usage

  1. dapr upgrade [flags]

Flags

NameEnvironment VariableDefaultDescription
—help, -hPrint this help message
—kubernetes, -kfalseUpgrade/Downgrade Dapr in a Kubernetes cluster
—runtime-versionlatestThe version of the Dapr runtime to upgrade/downgrade to, for example: 1.0.0
—setSet values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
—image-registryPulls container images required by Dapr from the given image registry

Examples

  1. # Upgrade Dapr in Kubernetes to latest version
  2. dapr upgrade -k
  3. # Upgrade or downgrade to a specified version of Dapr runtime in Kubernetes
  4. dapr upgrade -k --runtime-version 1.2
  5. # Upgrade or downgrade to a specified version of Dapr runtime in Kubernetes with value set
  6. dapr upgrade -k --runtime-version 1.2 --set global.logAsJson=true
  1. # Upgrade or downgrade using private registry, if you are using private registry for hosting dapr images and have used it while doing `dapr init -k`
  2. # Scenario 1 : dapr image hosted directly under root folder in private registry -
  3. dapr init -k --image-registry docker.io/username
  4. # Scenario 2 : dapr image hosted under a new/different directory in private registry -
  5. dapr init -k --image-registry docker.io/username/<directory-name>

Warning messages

This command can issue warning messages.

Root certificate renewal warning

If the mtls root certificate deployed to the Kubernetes cluster expires in under 30 days the following warning message is displayed:

  1. Dapr root certificate of your Kubernetes cluster expires in <n> days. Expiry date: <date:time> UTC.
  2. Please see docs.dapr.io for certificate renewal instructions to avoid service interruptions.

Last modified July 2, 2022: Docs for dapr int/upgrade in k8s mode using GHCR and private registry (#2508) (6f75254d)