Upgrade Dapr on a Kubernetes cluster
- Dapr CLI
- (if using Helm)
There are two ways to upgrade the Dapr control plane on a Kubernetes cluster using either the Dapr CLI or Helm.
The example below shows how to upgrade to version 1.5.0:
You can provide all the available Helm chart configurations using the Dapr CLI. See here for more info.
Troubleshooting upgrade using the CLI
There is a known issue running upgrades on clusters that may have previously had a version prior to 1.0.0-rc.2 installed on a cluster.
Most users should not encounter this issue, but there are a few upgrade path edge cases that may leave an incompatible CustomResourceDefinition installed on your cluster. The error message for this case looks like this:
The CustomResourceDefinition "configurations.dapr.io" is invalid: spec.preserveUnknownFields: Invalid value: true: must be false in order to use defaults in the schema
Then proceed with the dapr upgrade --runtime-version 1.5.0 -k
command as above.
Helm
From version 1.0.0 onwards, upgrading Dapr using Helm is no longer a disruptive action since existing certificate values will automatically be re-used.
Upgrade Dapr from 1.0.0 (or newer) to any [NEW VERSION] > 1.0.0:
Helm does not handle upgrading CRDs, so you need to perform that manually. CRDs are backward-compatible and should only be installed forward.
kubectl replace -f https://raw.githubusercontent.com/dapr/dapr/v1.5.0/charts/dapr/crds/subscription.yaml
If you’re using a values file, remember to add the
--values
option when running the upgrade command.Ensure all pods are running:
Restart your application deployments to update the Dapr runtime:
kubectl rollout restart deploy/<DEPLOYMENT-NAME>
All done!
Upgrading existing Dapr to enable high availability mode
Enabling HA mode in an existing Dapr deployment requires additional steps. Please refer to this paragraph for more details.