init CLI command reference

Detailed information on the init CLI command

Description

Install Dapr on supported hosting platforms.

Supported platforms

Usage

  1. dapr init [flags]

Flags

NameEnvironment VariableDefaultDescription
—enable-hafalseEnable high availability (HA) mode
—enable-mtlstrueEnable mTLS in your cluster
—help, -hPrint this help message
—kubernetes, -kfalseDeploy Dapr to a Kubernetes cluster
—waitfalseWait for Kubernetes initialization to complete
—timeout300The wait timeout for the Kubernetes installation
—namespace, -ndapr-systemThe Kubernetes namespace to install Dapr in
—networkDAPR_NETWORKThe Docker network on which to deploy the Dapr runtime
—runtime-versionlatestThe version of the Dapr runtime to install, for example: 1.0.0
—slim, -sfalseExclude placement service, Redis and Zipkin containers from self-hosted installation

Examples

Initialize Dapr in self-hosted mode

  1. dapr init

Initialize Dapr in Kubernetes

  1. dapr init -k

Initialize Dapr in Kubernetes and wait for the installation to complete

You can wait for the installation to complete its deployment with the --wait flag.

The default timeout is 300s (5 min), but can be customized with the --timeout flag.

  1. dapr init -k --wait --timeout 600

Initialize specified version of Dapr runtime in self-hosted mode

  1. dapr init --runtime-version 0.10.0

Initialize specified version of Dapr runtime in Kubernetes

  1. dapr init -k --runtime-version 0.10.0

Initialize Dapr in slim self-hosted mode

  1. dapr init -s

Last modified August 2, 2021 : Fix Java SDK link (#1695) (2c67fd1)