What is K8GB? Global load balancing across Kubernetes clusters with DNS
Learn how K8GB provides GSLB (global server load balancing) across Kubernetes clusters with DNS, the Gslb CRD, the roundRobin, failover and geoip strategies, the role of CoreDNS and ExternalDNS, and when it replaces a vendor GSLB.
Kubernetes$ kubectl get gslb -A▍You have the same application running in two clusters, in different regions, and you want users to land on the healthy cluster without anyone touching DNS at three in the morning. Traditionally this is the job of a vendor GSLB: a proprietary appliance or service, configured by another team, that knows nothing about your pods. K8GB solves this problem inside Kubernetes itself, using DNS.
What is K8GB
K8GB (Kubernetes Global Balancer) is an open source global server load balancing solution designed for Kubernetes. It is an operator: you install it in each cluster, create a Gslb resource pointing to an Ingress, a LoadBalancer Service, an Istio VirtualService or a Gateway API route, and K8GB starts answering for the application’s global name.
The project was born at Absa Group, a South African bank that needed to balance traffic across geographically distributed clusters based on the real health of its services. It joined the CNCF Sandbox in 2021 and, according to the project page, moved to Incubating in July 2026. As of November 2026 that is its current level; check the project page at cncf.io/projects/k8gb. It is licensed under Apache 2.0, and the latest version on the GitHub releases page as of this date is v1.0.1.
What problem it solves
Balancing traffic within a cluster is handled by Services and Ingress. Across clusters, the classic options have problems:
- Proprietary GSLB: expensive, operated outside Kubernetes, with generic health checks (ICMP, TCP, HTTP) that can’t see the pods.
- Manual DNS: someone changes the record when a region goes down, with TTLs and human error along the way.
- Single point of failure: solutions with a central “management cluster” go down along with it.
K8GB starts from three ideas: use DNS, a simple and reliable protocol for global scope; decide based on the pods’ liveness and readiness probes; and have no central cluster, because each instance answers on its own.
How it works
Each cluster runs the K8GB operator and an embedded CoreDNS that is the authoritative server for a delegated zone, for example cloud.example.com. The parent zone (example.com) lives in your edge DNS (Route 53, Cloud DNS, Azure DNS, Cloudflare, NS1, Infoblox or RFC 2136-compatible servers). K8GB uses ExternalDNS (or the provider-specific integration) to create the NS and glue records there that delegate the zone to the CoreDNS of every cluster.
| Piece | Role |
|---|---|
| K8GB operator | Watches Gslb resources, checks service health and generates DNS records |
Gslb CRD |
Declares which Ingress/Service/route gets global balancing and with which strategy |
| Embedded CoreDNS | Authoritative server for the load-balanced zone in each cluster |
| ExternalDNS / provider | Creates the delegation (NS + glue) in the edge DNS parent zone |
| Edge DNS | Existing parent zone that delegates the subzone to the clusters |
When a client resolves app.cloud.example.com, the recursive resolver reaches one of the CoreDNS instances. Each instance knows the healthy addresses of its own cluster and queries the other instances over DNS, so any of them returns an answer consistent with the chosen strategy. If a cluster’s pods have no ready endpoints, that cluster’s Ingress IPs disappear from the answer.
Strategies
| Strategy | Behavior |
|---|---|
roundRobin |
Returns endpoints from all healthy clusters, alternating |
roundRobin with weight |
Distributes by weight across regions (for example, 80/20); the parent DNS may reorder answers |
failover |
Stays pinned to the cluster with primaryGeoTag and only switches when it has no available pods |
geoip |
Like failover, but returns the “closest” cluster; requires your own GeoIP database and EDNS0 Client Subnet |
Hands-on example
First, the configuration of each cluster in the Helm chart. Each instance has its own geo tag and knows the others. The commands and values below follow the official documentation and were not run here, because they require two clusters and a real DNS zone:
# values-eu.yaml (on the "eu" cluster; on the "us" cluster swap the tags)
k8gb:
dnsZones:
- parentZone: "example.com"
loadBalancedZone: "cloud.example.com"
edgeDNSServers:
- "1.1.1.1"
clusterGeoTag: "eu"
extGslbClustersGeoTags: "us"
helm repo add k8gb https://www.k8gb.io
helm -n k8gb upgrade -i k8gb k8gb/k8gb --create-namespace -f values-eu.yaml
In practice, you also configure the extdns section (provider, credentials, domainFilters) following the guide for your edge DNS.
Then, on both clusters, the application gets a regular Ingress:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: app
namespace: shop
spec:
rules:
- host: app.cloud.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: app
port:
number: 80
And the Gslb resource, with the current apiVersion from the documentation (k8gb.io/v1beta1; the old k8gb.absa.oss/v1beta1 is still accepted and migrated automatically):
apiVersion: k8gb.io/v1beta1
kind: Gslb
metadata:
name: app
namespace: shop
spec:
resourceRef:
apiVersion: networking.k8s.io/v1
kind: Ingress
name: app
strategy:
type: failover
primaryGeoTag: eu
dnsTtlSeconds: 30
To test failover, scale the primary cluster down to zero replicas and watch the status:
kubectl -n shop get gslb app -o yaml | grep status -A6
kubectl -n shop scale deploy app --replicas=0
dig +short app.cloud.example.com
The healthyRecords field in the status should now show only the us cluster’s IPs, and dig (after the TTL) starts resolving there. For weighted round robin, switch the strategy to type: roundRobin and a weight map such as eu: 80 and us: 20.
When to use it (and when not to)
Use K8GB when:
- The same application runs on two or more clusters and you want failover or distribution across regions.
- You want the decision to depend on pod health, not on a ping to the load balancer.
- The platform team wants to offer self-service GSLB, declared in YAML and versioned with GitOps.
- You run on several clouds or on-premises and don’t want to tie GSLB to a vendor.
Avoid it or complement it when:
- You need failover in seconds: DNS depends on TTLs and on resolvers that don’t always honor them.
- Traffic requires per-request (layer 7) routing across regions, with retries and session affinity; then a cloud global load balancer or a multi-cluster service mesh such as Istio makes more sense.
- There is only one cluster: Services and Ingress already handle it.
- Data isn’t replicated across regions; moving traffic elsewhere doesn’t help if the database stayed behind.
Before trusting failover, test it on purpose, as described in chaos engineering.
Alternatives
| Option | Type | Note |
|---|---|---|
| K8GB | Open source, DNS, Kubernetes-native | No central cluster; decisions based on pod health |
| Appliance GSLB (F5, Citrix, Infoblox) | Proprietary | Rich features, operated outside Kubernetes |
| Route 53, Cloud DNS, Azure Traffic Manager | Managed DNS service | Simple, but health checks can’t see pods and lock-in is higher |
| Cloud global load balancer / CDN | Layer 7 anycast | Fast failover, tied to one provider |
| Multi-cluster service mesh | Layer 7 across clusters | More control, much more complexity |
If DNS inside the cluster is still fuzzy, review Kubernetes networking first.
Summary
- K8GB provides GSLB across Kubernetes clusters via DNS, with no vendor appliance
- CNCF Incubating project as of November 2026; check the current status on the project page
- One embedded CoreDNS per cluster answers for the delegated zone; ExternalDNS creates the delegation in the parent zone
- The
GslbCRD (k8gb.io/v1beta1) references an Ingress, LoadBalancer Service, VirtualService or Gateway API routes - Strategies:
roundRobin(with optional weights),failoverandgeoip - Health comes from readiness and liveness probes, not external pings
- Consider DNS TTLs and data replication before promising fast failover
GSLB stops being a ticket for the network team and becomes one more resource in your repository.