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.
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.
# Before installing Kong Mesh with Helm, configure your local Helm repository:# https://developer.konghq.com/mesh/2.11/production/cp-deployment/kubernetes/#helm
helm install\--create-namespace\--namespace kong-mesh-system \--set"kuma.namespaceAllowList={kuma-demo}"\
kong-mesh kong-mesh/kong-mesh
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-workloadsClusterRole to that namespace. It will also configure Kong Mesh’s mutating and validating webhooks to only work within the specified namespaces.
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:
# Before installing Kong Mesh with Helm, configure your local Helm repository:# https://developer.konghq.com/mesh/2.11/production/cp-deployment/kubernetes/#helm
helm install\--create-namespace\--namespace kong-mesh-system \--set"kuma.skipRBAC=true"\
kong-mesh kong-mesh/kong-mesh
# Before installing Kong Mesh with Helm, configure your local Helm repository:# https://developer.konghq.com/mesh/2.11/production/cp-deployment/kubernetes/#helm
helm install\--create-namespace\--namespace kong-mesh-system \--set"kuma.controlPlane.skipClusterRoleCreation=true"\
kong-mesh kong-mesh/kong-mesh
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.