Multitenancy refers to the ability to safely run multiple teams, applications, or customer instances within shared infrastructure while maintaining appropriate isolation boundaries.

In multicluster environments, the principle of namespace sameness determines how services are identified and aggregated across clusters. While this approach provides significant operational benefits, it introduces critical limitations when namespace naming cannot be aligned across all clusters.

Review the following sections to understand how these principles are implemented in multicluster service mesh environments, considerations for implementation, and common multitenancy patterns.

Tenant boundaries and namespaces

In Kubernetes, the fundamental unit of tenancy is the namespace. Each tenant (such as a team, product, or customer instance) gets its own namespace, which serves as an isolation boundary for that tenant’s workloads and resources. This approach leverages built-in, namespace-scoped isolation features, like RBAC rules, to enforce isolation.

Istio aligns closely with this model, meaning that policies derive their primary scope from the namespace in which they’re placed. Consequently, namespaces are the default boundary for tenants in Istio-managed environments.

Namespace sameness in multicluster environments

Kubernetes lacks a native concept above namespaces to represent shared boundaries across clusters. To address this, the Kubernetes Multicluster SIG introduced the principle of namespace sameness, which determines that namespaces with the same name in different clusters are treated as the same logical namespace.

To illustrate this concept, consider two peered clusters, cluster-1 and cluster-2, each containing a payments namespace with a checkout service. When the service is configured for multicluster discovery, Istio treats these as a single logical service and aggregates their endpoints. Requests to the service are load balanced across endpoints in both clusters.

This assumption brings significant benefits:

  • Simplified RBAC: Administrators can grant access to a namespace, and have that permission automatically apply to all clusters containing a namespace with that name.
  • Easier telemetry: Data can be aggregated per tenant more easily with consistent namespaces everywhere.
  • Consistent policy distribution: Policies defined for a namespace can be distributed and honored across clusters uniformly.

Multicluster functionality in Istio operates on the same namespace sameness assumption:

  • An AuthorizationPolicy allowing traffic from a namespace implicitly allows traffic from a namespace of the same name in any peered cluster.
  • Services with identical names in the same namespace across clusters, when marked global, are considered as a single logical service with aggregated endpoints.

This model works well when namespace sameness can be maintained across all clusters. However, many real-world scenarios violate this assumption, leading to conflicts that standard Istio features cannot resolve.

Additional multitenancy considerations

Beyond namespace sameness, multitenancy in service meshes requires addressing several other concerns.

Traffic isolation: A fundamental requirement for multitenancy is precisely controlling whether and how traffic flows between tenants. Istio provides the AuthorizationPolicy API to achieve traffic isolation, scoped at the namespace level and based on identity attributes like service accounts, namespaces, or trust domains.

Trust domains: Trust domains define the root of trust for service identities within a mesh. By default, Istio uses cluster.local as the trust domain. In multicluster setups, you can use a shared trust domain for simplified global mesh management, or assign each cluster a unique trust domain for stronger isolation boundaries and cluster-level authorization.

Configuration and service discovery: Other multitenancy concerns include configuration isolation and service discovery visibility. Segments address namespace sameness specifically but don’t solve these broader concerns, which are discussed in the limitations section below.

Common multitenancy patterns

Organizations typically adopt one of several architectural patterns for implementing multitenancy, each with specific trade-offs around isolation, operational overhead, and complexity. These patterns work well when namespace sameness can be maintained across clusters.

Flip through the following tabs to review common multitenancy patterns.

These patterns work well when namespace sameness can be maintained across all clusters in your mesh. However, many real-world scenarios break this assumption, as shown in the next guide.

Next

Now that you understand the concepts of multitenancy and namespace sameness in multicluster service meshes, continue to review challenges with namespace sameness, and how segments address them.