Deploy Dapr on a Kubernetes cluster

When setting up Kubernetes you can use either the Dapr CLI or Helm.

For more information on what is deployed to your Kubernetes cluster read the Kubernetes overview

  • Install
  • Kubernetes cluster (see below if needed)

You can install Dapr on any Kubernetes cluster. Here are some helpful links:

Hybrid clusters

Both the Dapr CLI and the Dapr Helm chart automatically deploy with affinity for nodes with the label . You can deploy Dapr to Windows nodes if your application requires it. For more information see .

You can install Dapr to a Kubernetes cluster using the Dapr CLI.

Install Dapr

The -k flag initializes Dapr on the Kubernetes cluster in your current context.

Ensure correct cluster is set

Run the following command on your local machine to init Dapr on your cluster:

  1. Making the jump to hyperspace...
  2. Deploying the Dapr control plane to your cluster...
  3. Success! Dapr has been installed to namespace dapr-system. To verify, run "dapr status -k" in your terminal. To get started, go here: https://aka.ms/dapr-getting-started

Install in custom namespace

The default namespace when initializing Dapr is dapr-system. You can override this with the -n flag.

You can run Dapr with 3 replicas of each control plane pod in the dapr-system namespace for production scenarios.

  1. dapr init -k --enable-ha=true

Disable mTLS

Dapr is initialized by default with mTLS. You can disable it with:

Uninstall Dapr on Kubernetes with CLI

Run the following command on your local machine to uninstall Dapr on your cluster:

  1. dapr uninstall -k

You can install Dapr on Kubernetes using a Helm 3 chart.

Ensure you are on Helm v3

  1. Make sure is installed on your machine

  2. Add Helm repo and update

    1. helm repo add dapr https://dapr.github.io/helm-charts/
    2. helm repo update
    3. helm search repo dapr --devel --versions
  3. Install the Dapr chart on your cluster in the dapr-system namespace.

    1. helm upgrade --install dapr dapr/dapr \
    2. --version=1.0.1 \
    3. --create-namespace \
    4. --wait

    To install in high availability mode:

    See Guidelines for production ready deployments on Kubernetes for more information on installing and upgrading Dapr using Helm.

Uninstall Dapr on Kubernetes

  1. helm uninstall dapr --namespace dapr-system

More information

  • Read for recommended Helm chart values for production setups
  • See this page for details on Dapr Helm charts.

Once the installation is complete, verify that the dapr-operator, dapr-placement, dapr-sidecar-injector and dapr-sentry pods are running in the dapr-system namespace:

  1. kubectl get pods --namespace dapr-system
  1. NAME READY STATUS RESTARTS AGE
  2. dapr-dashboard-7bd6cbf5bf-xglsr 1/1 Running 0 40s
  3. dapr-operator-7bd6cbf5bf-xglsr 1/1 Running 0 40s
  4. dapr-placement-7f8f76778f-6vhl2 1/1 Running 0 40s
  5. dapr-sentry-9435776c7f-8f7yd 1/1 Running 0 40s