All Products
Search
Document Center

Microservices Engine:MSE RBAC permissions on access to ACK clusters

Last Updated:Mar 11, 2026

Microservices Engine (MSE) accesses Container Service for Kubernetes (ACK) cluster resources through a Kubernetes role-based access control (RBAC) ClusterRole. This ClusterRole is automatically created and bound to the MSE service-linked role, granting MSE only the minimum permissions required to operate within your cluster.

This topic describes how the two permission layers work together, what cluster resources MSE can access, and how to revoke that access.

How MSE accesses your ACK cluster

MSE relies on two permission layers to access Kubernetes resources in your ACK cluster:

LayerScopeMechanism
IAMAlibaba Cloud account levelThe service-linked role AliyunServiceRoleForMSE authorizes MSE to call ACK APIs on your behalf.
Kubernetes RBACCluster levelThe ClusterRole mse-aliyunserviceroleformse-clusterrole defines what Kubernetes resources MSE can read or modify inside the cluster.

Both layers must be in place for MSE to function. Removing either one blocks MSE from accessing cluster resources.

When the RBAC ClusterRole is created

The ClusterRole is not pre-installed in your ACK cluster. MSE creates it automatically when both of the following conditions are met for the first time:

  1. The service-linked role AliyunServiceRoleForMSE exists in your account.

  2. MSE accesses the ACK cluster.

This ClusterRole grants only the minimum permissions that specific MSE features require. It does not affect any RBAC roles or bindings that you have configured.

Permission details

The following table summarizes the ClusterRole permissions, grouped by feature area.

Feature areaResourcesAllowed operationsPurpose
Core resource discoverypods, nodes, services, namespaces, endpoints, secrets, configmapsget, list, watchRead cluster state for service discovery and configuration sync.
Endpoint discoveryendpointslicesget, list, watchDiscover service endpoints through the Discovery API.
Ingress managementingresses, ingressclassesget, list, watchRead ingress configurations for cloud-native gateway routing.
Ingress statusingresses/statusallUpdate ingress status to reflect gateway state.
Gateway APIAll resources in gateway.networking.k8s.io and networking.x-k8s.ioallManage Gateway API resources for the cloud-native gateway.
Custom resource definitionscustomresourcedefinitionsget, list, watchDiscover CRDs registered in the cluster.
Istio meshworkloadentries, workloadentries/statusget, list, watch, create, update, patch, deleteManage Istio WorkloadEntry resources for service mesh integration.
Service and namespace provisioningservices, namespacesget, list, watch, createCreate services and namespaces required by MSE components.
Deployment provisioningdeploymentsget, list, watch, createDeploy MSE-managed workloads into the cluster.
MSE custom resourcesmseingressconfigs, mseingressconfigs/statusget, list, watchRead MSE-specific ingress configuration CRDs.
Event monitoringeventsget, list, watchMonitor cluster events for diagnostics.

Full ClusterRole YAML

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: mse-aliyunserviceroleformse-clusterrole
rules:
  # Core resource discovery
  - apiGroups: [""]
    resources: ["pods", "nodes", "services", "namespaces", "endpoints", "secrets", "configmaps"]
    verbs: ["get", "watch", "list"]
  - apiGroups: ["discovery.k8s.io"]
    resources: ["endpointslices"]
    verbs: ["get", "list", "watch"]

  # Ingress management
  - apiGroups: ["networking.k8s.io"]
    resources: ["ingresses", "ingressclasses"]
    verbs: ["get", "list", "watch"]
  - apiGroups: ["networking.k8s.io"]
    resources: ["ingresses/status"]
    verbs: ["*"]

  # Gateway API
  - apiGroups: ["networking.x-k8s.io", "gateway.networking.k8s.io"]
    resources: ["*"]
    verbs: ["get", "watch", "list"]
  - apiGroups: ["networking.x-k8s.io", "gateway.networking.k8s.io"]
    resources: ["*"]
    verbs: ["*"]

  # Custom resource definitions
  - apiGroups: ["apiextensions.k8s.io"]
    resources: ["customresourcedefinitions"]
    verbs: ["get", "list", "watch"]

  # Istio mesh integration
  - apiGroups: ["networking.istio.io"]
    verbs: ["get", "watch", "list", "update", "patch", "create", "delete"]
    resources: ["workloadentries"]
  - apiGroups: ["networking.istio.io"]
    verbs: ["get", "watch", "list", "update", "patch", "create", "delete"]
    resources: ["workloadentries/status"]

  # Service, namespace, and deployment provisioning
  - apiGroups: [""]
    resources: ["services", "namespaces"]
    verbs: ["get", "list", "watch", "create"]
  - apiGroups: ["apps"]
    resources: ["deployments"]
    verbs: ["get", "list", "watch", "create"]

  # MSE custom resources
  - apiGroups: ["mse.alibabacloud.com"]
    resources: ["mseingressconfigs", "mseingressconfigs/status"]
    verbs: ["get", "watch", "list"]

  # Event monitoring
  - apiGroups: ["events.k8s.io"]
    resources: ["events"]
    verbs: ["get", "watch", "list"]

Revoke MSE access to an ACK cluster

To stop MSE from accessing a specific ACK cluster, use one of the following methods.

Method 1: Clear the RBAC ClusterRole permissions

Edit the ClusterRole in the ACK console to remove all permission rules. This blocks MSE from accessing resources in that specific cluster while keeping the service-linked role intact for other clusters.

  1. Log on to the ACK console with your Alibaba Cloud account.

  2. In the left-side navigation pane, click Clusters.

  3. On the Clusters page, click the name of the target cluster.

  4. In the left-side navigation pane, choose Security > Role.

  5. Click the Cluster Role tab, enter mse-aliyunserviceroleformse-clusterrole in the search box, and click the search icon.

  6. In the Actions column, click Edit YAML.

  7. In the YAML editor, add the inner.service.alibabacloud.com/user-customized: true annotation and clear the rules field:

        apiVersion: rbac.authorization.k8s.io/v1
        kind: ClusterRole
        metadata:
          annotations:
            inner.service.alibabacloud.com/user-customized: true
          name: mse-aliyunserviceroleformse-clusterrole
        rules: []

Note: The inner.service.alibabacloud.com/user-customized: true annotation prevents MSE from automatically restoring the default permissions.

Method 2: Delete the MSE service-linked role

Delete the AliyunServiceRoleForMSE service-linked role to revoke MSE access to all ACK clusters in your account. This also disables all MSE features that depend on the role.

For instructions, see MSE service-linked role.