All Products
Search
Document Center

Alibaba Cloud Service Mesh:What are the differences between namespaces in an ASM instance and those of the clusters in the data plane managed by the ASM instance?

Last Updated:Oct 07, 2023

Service Mesh (ASM) is a managed service mesh platform. It decouples the control plane of a service mesh from the data plane that the control plane manages. You can separately manage the lifecycle of the control plane and data plane. The data plane is where Container Service for Kubernetes (ACK) clusters reside. In the ASM console, you can create, define, and delete namespaces in an ASM instance to manage resources in the data plane. This topic describes the difference between namespaces in an ASM instance and those of the clusters in the data plane managed by the ASM instance. This topic also describes how to enable automatic sidecar proxy injection for a namespace in the ASM console.

Differences

The namespaces that you create in an ASM instance, whether in the ASM console or by using the kubectl client, belong only to the ASM instance. They are independent of the Kubernetes clusters in the data plane that are managed by the ASM instance. Therefore, the namespaces in the control plane of the ASM instance may be different from the namespaces of the Kubernetes clusters in the data plane. When you create or delete namespaces for the ASM instance, the namespaces of the Kubernetes clusters in the data plane managed by the ASM instance are not affected.

Enable automatic sidecar proxy injection for a namespace

You can enable automatic sidecar proxy injection for a namespace of a Kubernetes cluster. After automatic sidecar proxy injection is enabled, the istio-injection=enabled label is added to the namespace. An Envoy proxy is automatically injected as a sidecar into each pod that is created in the namespace. You can also disable automatic sidecar proxy injection for the namespace. After automatic sidecar injection is disabled, the istio-injection=disabled label is added to the namespace.

In the ASM console, you can enable automatic sidecar proxy injection for a namespace of a Kubernetes cluster in a convenient way. For more information, see Enable automatic sidecar proxy injection.

Note

After you enable or disable automatic sidecar proxy injection for namespaces of an ASM instance in the ASM console, ASM automatically synchronizes the configurations to the Kubernetes clusters in the data plane. However, the creation and deletion of namespaces in the control plane are not synchronized to the Kubernetes clusters in the data plane. This ensures the stability of the resources used by the Kubernetes clusters in the data plane.