Metrics Overview
KubeLB components expose metrics on the following endpoints:| Component | Default Port | Endpoint |
|---|---|---|
| Manager | :9443 | /metrics |
| CCM | :9445 | /metrics |
| Envoy Proxy | :19001 | /stats/prometheus |
Manager Metrics
Metrics exposed by the KubeLB Manager component running in the management cluster.LoadBalancer Metrics
Track LoadBalancer resources and reconciliation performance:| Metric | Type | Labels | Description |
|---|---|---|---|
kubelb_manager_loadbalancers | Gauge | namespace, tenant, topology | Current number of LoadBalancer resources |
kubelb_manager_loadbalancer_reconcile_total | Counter | namespace, result | Total LoadBalancer reconciliation attempts |
kubelb_manager_loadbalancer_reconcile_duration_seconds | Histogram | namespace | LoadBalancer reconciliation duration |
Route Metrics
Monitor Layer 7 routing (Ingress/Gateway API) resources:| Metric | Type | Labels | Description |
|---|---|---|---|
kubelb_manager_routes | Gauge | namespace, tenant, route_type | Current number of Route resources |
kubelb_manager_route_reconcile_total | Counter | namespace, route_type, result | Total Route reconciliation attempts |
kubelb_manager_route_reconcile_duration_seconds | Histogram | namespace | Route reconciliation duration |
Tenant Metrics
Track tenant resources and reconciliation:| Metric | Type | Labels | Description |
|---|---|---|---|
kubelb_manager_tenants | Gauge | - | Current number of Tenant resources |
kubelb_manager_tenant_reconcile_total | Counter | result | Total Tenant reconciliation attempts |
kubelb_manager_tenant_reconcile_duration_seconds | Histogram | - | Tenant reconciliation duration |
Envoy Control Plane Metrics
Monitor the xDS control plane for Envoy proxies:| Metric | Type | Labels | Description |
|---|---|---|---|
kubelb_manager_envoy_proxies | Gauge | namespace, topology | Current number of Envoy proxy deployments |
kubelb_manager_envoycp_clusters | Gauge | snapshot_name | Number of clusters in Envoy snapshot |
kubelb_manager_envoycp_listeners | Gauge | snapshot_name | Number of listeners in Envoy snapshot |
kubelb_manager_envoycp_endpoints | Gauge | snapshot_name | Number of endpoints in Envoy snapshot |
kubelb_manager_envoycp_snapshot_updates_total | Counter | snapshot_name | Total Envoy snapshot updates |
kubelb_manager_envoycp_reconcile_total | Counter | result | Total Envoy control plane reconciliations |
kubelb_manager_envoycp_reconcile_duration_seconds | Histogram | - | Envoy control plane reconciliation duration |
Port Allocator Metrics
Monitor port allocation for Layer 4 load balancing:| Metric | Type | Description |
|---|---|---|
kubelb_manager_port_allocator_allocated_ports | Gauge | Current number of allocated ports |
kubelb_manager_port_allocator_endpoints | Gauge | Current number of tracked endpoints |
SyncSecret Metrics
Track secret synchronization between tenant and management clusters:| Metric | Type | Labels | Description |
|---|---|---|---|
kubelb_manager_sync_secret_reconcile_total | Counter | namespace, result | Total SyncSecret reconciliation attempts |
kubelb_manager_sync_secret_reconcile_duration_seconds | Histogram | namespace | SyncSecret reconciliation duration |
CCM Metrics
Metrics exposed by the KubeLB CCM component running in tenant clusters.Service Metrics
Monitor LoadBalancer service reconciliation:| Metric | Type | Labels | Description |
|---|---|---|---|
kubelb_ccm_managed_services | Gauge | namespace | Current number of managed LoadBalancer services |
kubelb_ccm_service_reconcile_total | Counter | namespace, result | Total Service reconciliation attempts |
kubelb_ccm_service_reconcile_duration_seconds | Histogram | namespace | Service reconciliation duration |
Ingress Metrics
Track Ingress resource management:| Metric | Type | Labels | Description |
|---|---|---|---|
kubelb_ccm_managed_ingresses | Gauge | namespace | Current number of managed Ingresses |
kubelb_ccm_ingress_reconcile_total | Counter | namespace, result | Total Ingress reconciliation attempts |
kubelb_ccm_ingress_reconcile_duration_seconds | Histogram | namespace | Ingress reconciliation duration |
Gateway API Metrics
Monitor Gateway API resources:| Metric | Type | Labels | Description |
|---|---|---|---|
kubelb_ccm_managed_gateways | Gauge | namespace | Current number of managed Gateways |
kubelb_ccm_managed_httproutes | Gauge | namespace | Current number of managed HTTPRoutes |
kubelb_ccm_managed_grpcroutes | Gauge | namespace | Current number of managed GRPCRoutes |
kubelb_ccm_gateway_reconcile_total | Counter | namespace, result | Total Gateway reconciliation attempts |
kubelb_ccm_httproute_reconcile_total | Counter | namespace, result | Total HTTPRoute reconciliation attempts |
kubelb_ccm_grpcroute_reconcile_total | Counter | namespace, result | Total GRPCRoute reconciliation attempts |
kubelb_ccm_gateway_reconcile_duration_seconds | Histogram | namespace | Gateway reconciliation duration |
kubelb_ccm_httproute_reconcile_duration_seconds | Histogram | namespace | HTTPRoute reconciliation duration |
kubelb_ccm_grpcroute_reconcile_duration_seconds | Histogram | namespace | GRPCRoute reconciliation duration |
Node Metrics
Track node endpoints for load balancing:| Metric | Type | Labels | Description |
|---|---|---|---|
kubelb_ccm_nodes | Gauge | - | Current number of nodes in the cluster |
kubelb_ccm_node_reconcile_total | Counter | result | Total Node reconciliation attempts |
kubelb_ccm_node_reconcile_duration_seconds | Histogram | - | Node reconciliation duration |
KubeLB Cluster Connection Metrics
Monitor connectivity between CCM and the management cluster:| Metric | Type | Labels | Description |
|---|---|---|---|
kubelb_ccm_kubelb_cluster_connected | Gauge | - | Connection status (1=connected, 0=disconnected) |
kubelb_ccm_kubelb_cluster_operations_total | Counter | operation, result | Total operations to management cluster |
kubelb_ccm_kubelb_cluster_latency_seconds | Histogram | operation | Operation latency to management cluster |
SyncSecret Metrics
| Metric | Type | Labels | Description |
|---|---|---|---|
kubelb_ccm_sync_secret_reconcile_total | Counter | namespace, result | Total SyncSecret reconciliation attempts |
kubelb_ccm_sync_secret_reconcile_duration_seconds | Histogram | namespace | SyncSecret reconciliation duration |
EnvoyCP Metrics
Metrics exposed by the Envoy Control Plane component (embedded in Manager).Cache Metrics
Monitor xDS cache performance:| Metric | Type | Labels | Description |
|---|---|---|---|
kubelb_envoy_control_plane_cache_hits_total | Counter | snapshot_name | Total cache hits for snapshot lookups |
kubelb_envoy_control_plane_cache_misses_total | Counter | snapshot_name | Total cache misses for snapshot lookups |
kubelb_envoy_control_plane_cache_clears_total | Counter | snapshot_name | Total cache clears |
gRPC Metrics
Monitor xDS gRPC connections:| Metric | Type | Labels | Description |
|---|---|---|---|
kubelb_envoy_control_plane_grpc_connections | Gauge | - | Current number of active gRPC connections |
kubelb_envoy_control_plane_grpc_requests_total | Counter | type_url | Total gRPC xDS requests |
kubelb_envoy_control_plane_grpc_responses_total | Counter | type_url | Total gRPC xDS responses |
Snapshot Metrics
| Metric | Type | Labels | Description |
|---|---|---|---|
kubelb_envoy_control_plane_snapshots | Gauge | - | Current number of active Envoy snapshots |
kubelb_envoy_control_plane_snapshot_updates_total | Counter | snapshot_name | Total Envoy snapshot updates |
kubelb_envoy_control_plane_snapshot_generation_duration_seconds | Histogram | snapshot_name | Snapshot generation duration |
kubelb_envoy_control_plane_clusters | Gauge | snapshot_name | Number of clusters in snapshot |
kubelb_envoy_control_plane_listeners | Gauge | snapshot_name | Number of listeners in snapshot |
kubelb_envoy_control_plane_routes | Gauge | snapshot_name | Number of routes in snapshot |
kubelb_envoy_control_plane_secrets | Gauge | snapshot_name | Number of secrets in snapshot |
Label Reference
Common labels used across KubeLB metrics:| Label | Description | Example Values |
|---|---|---|
namespace | Kubernetes namespace | tenant-production, kubelb |
tenant | KubeLB tenant identifier | production, staging |
result | Reconciliation result | success, error, skipped |
route_type | Type of route resource | ingress, gateway, httproute, grpcroute |
topology | Envoy proxy topology | shared |
operation | Operation type | create, update, delete |
snapshot_name | Envoy xDS snapshot ID | default, tenant-production |
type_url | Envoy xDS resource type | type.googleapis.com/envoy.config.cluster.v3.Cluster |
Prometheus Configuration
ServiceMonitor (Prometheus Operator)
Create ServiceMonitors to automatically discover KubeLB metrics endpoints:Manual Prometheus Scrape Configuration
If not using Prometheus Operator, add scrape configs manually:prometheus.yml
Alerting Rules
Recommended Alerts
Grafana Dashboards
Dashboard Templates
KubeLB provides pre-built Grafana dashboard templates. Import these dashboards using the Grafana UI or provision them via ConfigMaps.Manager Dashboard
Monitors Manager metrics including LoadBalancer reconciliation, Envoy control plane, and port allocation.Key panels:
- LoadBalancer count by tenant
- Reconciliation success rate
- Envoy proxy count and snapshot resources
- P95/P99 reconciliation latency
CCM Dashboard
Tracks CCM metrics including service reconciliation, node endpoints, and management cluster connectivity.Key panels:
- Managed services count
- CCM connection status
- Reconciliation error rate
- Operation latency to management cluster
Example Dashboard Queries
LoadBalancer Success Rate
LoadBalancer Success Rate
Top Namespaces by LoadBalancer Count
Top Namespaces by LoadBalancer Count
Envoy Proxy Resource Utilization
Envoy Proxy Resource Utilization
CCM to Management Cluster Latency
CCM to Management Cluster Latency
Health Checks
Both Manager and CCM expose health check endpoints:Next Steps
Troubleshooting
Debug issues using logs and metrics
Configuration
Tune KubeLB configuration for your environment
