Tenant Model
In KubeLB, a tenant represents a single consumer cluster that uses the centralized load balancing services. Each tenant cluster:- Is registered as a
TenantCRD in the management cluster - Has its own namespace in the management cluster
- Maintains isolated load balancer configurations
- Can have custom settings and policies
Isolation
Each tenant’s resources are isolated in separate namespaces
Configuration
Tenants can have custom load balancer and routing policies
Security
RBAC ensures tenants can only access their own resources
Scalability
Support for hundreds of tenant clusters
Tenant Resource
TheTenant CRD is a cluster-scoped resource that defines a tenant’s configuration:
Creating a Tenant
Create Namespace
The KubeLB Manager automatically creates a namespace for the tenant. The namespace name typically matches the tenant name.
Namespace Mapping
KubeLB uses a namespace mapping strategy to isolate tenant resources:Resource Organization
When a tenant cluster creates resources:- Tenant Cluster: Service created in namespace
app-namespace - Management Cluster: LoadBalancer CRD created in
tenant-namenamespace - Resource Labels: Original namespace is preserved in labels:
The namespace in the management cluster corresponds to the tenant, not the original namespace in the tenant cluster.
Tenant Configuration
Load Balancer Settings
Configure Layer 4 load balancing behavior:- Enable (Default)
- Disable
Ingress Settings
Configure Ingress resource handling:Gateway API Settings
Configure Gateway API support:The
defaultGateway field specifies which Gateway in the management cluster should be used for this tenant’s routes.DNS Configuration
Configure DNS automation for hostname-based load balancing:Wildcard Domain
Wildcard Domain
When set, services can request hostnames under this domain:
Explicit Hostnames
Explicit Hostnames
When
allowExplicitHostnames: true, services can use any hostname:Certificate Settings
Configure automatic TLS certificate provisioning:- Create a Certificate resource using cert-manager
- Request a certificate from the specified ClusterIssuer
- Configure TLS on the generated Route/Ingress
Annotation Propagation
Tenants can control which annotations are propagated from the tenant cluster to the management cluster:Propagate Specific Annotations
- Empty value means any value is allowed
- Specific value means only that value is propagated
Propagate All Annotations
Default Annotations
Set default annotations that will be added to resources if not present:all: Applied to all resourcesservice: LoadBalancer services onlyingress: Ingress resources onlygateway,httproute,grpcroute, etc.: Specific Gateway API resources
Tenant Isolation
Resource Isolation
KubeLB ensures strict resource isolation between tenants:Namespace Separation
Each tenant’s resources are created in a dedicated namespace in the management cluster.
Configuration Isolation
Tenant-specific configurations are isolated:Envoy Configuration Isolation
With shared topology (default), each tenant gets its own Envoy proxy deployment, providing:- Isolated data plane per tenant
- Independent scaling per tenant
- Tenant-specific resource limits
- Fault isolation (one tenant’s traffic issues don’t affect others)
Multi-Cluster Scenarios
Scenario 1: Multiple Production Clusters
Each region has its own tenant configuration with region-specific settings.Scenario 2: Environment Separation
Different tenants for dev, staging, and production environments with different policies.Scenario 3: Team-Based Isolation
Each team manages their own cluster with independent load balancing configuration.Configuration Precedence
When both global Config and Tenant configurations exist, tenant settings take precedence:- Tenant Configuration (highest priority)
- Global Config (fallback)
- Default Values (lowest priority)
Best Practices
Namespace Strategy
Namespace Strategy
Use consistent naming for tenant namespaces. For example, prefix with team or environment name:
team-frontend, env-production.Resource Quotas
Resource Quotas
Consider setting resource quotas on tenant namespaces in the management cluster to prevent resource exhaustion.
Annotation Policies
Annotation Policies
Define clear policies for which annotations should be propagated. Avoid propagating all annotations unless necessary.
Security
Security
Use dedicated service accounts for each tenant’s CCM with minimal required permissions (RBAC).
Monitoring
Monitoring
Set up tenant-specific monitoring and alerting to track resource usage and performance per tenant.
Disabling Features Per Tenant
You can selectively disable features for specific tenants:- Legacy clusters that only use Ingress
- Clusters that manage their own load balancers
- Gradual migration scenarios
Next Steps
Envoy Topology
Learn how Envoy proxies are deployed per tenant
Configuration
Global Config CRD reference
Installation
Install and configure KubeLB
RBAC
Configure role-based access control
