Isolation

How Dapr provides namespacing and isolation

Dapr namespacing provides isolation and multi-tenancy across many capabilities, giving greater security. Typically applications and components are deployed to namespaces to provide isolation in a given environment, such as Kubernetes.

Dapr supports namespacing in service invocation calls between applications, when accessing components, sending pub/sub messages in consumer groups, and with actors type deployments as examples. Namespacing isolation is supported in both self-hosted and Kubernetes modes.

To get started, create and configure your namespace.

In self-hosted mode, specify the namespace for a Dapr instance by setting the NAMESPACE environment variable.

On Kubernetes, create and configure the namespace:

  1. kubectl create namespace namespaceA
  2. kubectl config set-context --current --namespace=namespaceA

Then deploy your applications into this namespace.

Learn how to use namespacing throughout Dapr:

Last modified October 11, 2024: Fixed typo (#4389) (fe17926)