Manage Control Plane permissions on Kubernetes

Uses: Kong Mesh

By default, Kong Mesh deployed on Kubernetes reacts to events and observes all resources at the cluster scope. This approach benefits first-time users who want to explore its functionality and simplifies migration into the mesh. However, in production environments, restricting access to specific resources can enhance security and ensure that Kong Mesh does not impact running applications.

Restrict permissions to selected namespaces

You can define a list of namespaces that Kong Mesh’s control plane can access. When this list is set, Kong Mesh will only have permissions in those selected namespaces and in its own system namespace. It won’t be able to access or manage resources in any other namespace.

Set allowed namespaces during installation

To restrict Kong Mesh to a specific set of namespaces, set the following option during installation:

Replace kuma-demo with a comma-separated list of namespaces you want Kong Mesh to manage.

This will create a RoleBinding in each listed namespace, binding the kong-mesh-control-plane-workloads ClusterRole to that namespace. It will also configure Kong Mesh’s mutating and validating webhooks to only work within the specified namespaces.

Manually manage RBAC resources

If your environment restricts creating cluster-scoped resources (ClusterRole or ClusterRoleBinding), or if you prefer to manage permissions yourself, you can disable automatic creation during installation.

Before installing Kong Mesh, you must manually create the following resources:

  • ClusterRole and ClusterRoleBinding used by the control plane
  • Role and RoleBinding within the control plane namespace
  • (Optional) RoleBindings in selected namespaces when using namespaceAllowList

You can find the complete set of required manifests here:

These manifests include the kong-mesh-control-plane-workloads binding, granting the control plane write access to resources across all namespaces.

Important: All required resources must be created before installing Kong Mesh.

To disable automatic resource creation, use the following settings during installation:

Skip creation of all resources:

Skip only cluster-scoped resources:

Important: If you choose to manage Kong Mesh’s RBAC resources yourself, make sure to keep them in sync during upgrades. When a new version of Kong Mesh is released, roles and role bindings may change, and it’s your responsibility to update them accordingly.

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!