Skip to content

About

Demo for the talk "Evaluating Global Load Balancing Options for Kubernetes in Practice" presented at ContainerDays 2025

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

containerdays2025-gslb

Demo for the talk "Evaluating Global Load Balancing Options for Kubernetes in Practice" presented at ContainerDays 2025 in Hamburg by Nicolai Ort and Tobias Schneck. Slides are shared on Google Docs: https://docs.google.com/presentation/d/10l3WNjHVwei7WuuTQrpcSLnK3m5OZ0XGGzghR7P0GDM/edit?usp=sharing

This is an updated version of the talk we presented at Cloud Native Rejekts 2025 in London. You can find the repo for that talk here: https://github.com/nicolaiort/rejekts2025-gslb

What's new?

  • Updated to k8gb v0.15.0
  • Updated cert-manager to v1.18.2
  • Added DNSSEC support for k8gb demo -> Pretty cool, right? :)

Overview

This repository contains two main demos:

  1. k8gb: A demo of the k8gb global load balancer
  • Round Robin based load balancing across multiple clusters
  • Failover based load balancing across multiple clusters with one primary cluster and multiple secondary clusters
  • DNSSEC support
  1. clustermesh: A demo of clustermesh based load balancing implemented with cilium

We also included the drawings we used in the talk to explain the concepts of global load balancing in the images directory. The .excalidraw.svg files are editable with Excalidraw.

Try it for yourself

Please note that this repo contains secrets encrypted with git-crypt, they are only used for the live-demo and are not needed to run the demo yourself. You can just override the secrets with your own values.

Prerequisites

  • Three Kubernetes clusters (we used clusters managed by KKP) with:
    • LoadBalancers that are reachable from each other and your local machine
    • LoadBalancers must support UDP (yes, some cloud providers don't support UDP for LoadBalancers)
  • A public domain name hosted on a DNS provider that supports external-dns (we used Cloudflare)
  • Kubectl installed on your local machine
  • Helm installed on your local machine
  • Make installed on your local machine

Setup your environment

  1. Clone this repository:

    git clone git@github.com:nicolaiort/containderdays2025-gslb.git #via SSH
    # or
    git clone https://github.com/nicolaiort/containderdays2025-gslb.git #via HTTPS
  2. Change into the directory:

    cd containderdays2025-gslb

K8GB Demo

  1. Switch to the k8gb directory:

    cd k8gb
  2. Get your kubeconfigs for the clusters you want to use and place them in the .secrets directory. The files should be named cluster1, cluster2, etc.

  3. Create secrets, create namespaces and install nginx with cert-manager into your clusters:

    make setup
  4. Setup k8gb in your clusters:

    make k8gb-setup

Round Robin

  1. Set your demo service to round-robin:

    make k8gb-roundrobin
  2. Observe the responses of the demo service:

    make repeat TIMES=10 COMMAND="make curl-resolved DOMAIN=demo.k8gb.nig.gl"
    # or to just get the counts
    make dig-chart TIMES=100 DOMAIN="demo.k8gb.nig.gl"

    It should round-robin between the clusters.

  3. Take down one of the clusters:

    make stop-service CLUSTERID=1
  4. Observe the responses of the demo service:

    make repeat TIMES=10 COMMAND="make curl-resolved DOMAIN=demo.k8gb.nig.gl"

    It should round-robin between the clusters excluding the one we took down.

  5. Bring the cluster back up:

    make start-service CLUSTERID=1
  6. Observe the responses of the demo service:

    make repeat TIMES=10 COMMAND="make curl-resolved DOMAIN=demo.k8gb.nig.gl"

    It should round-robin between all clusters again.

Failover

  1. Set your demo service to failover:

    make k8gb-failover
  2. Observe the responses of the demo service:

    make repeat TIMES=10 COMMAND="make curl-resolved DOMAIN=demo.k8gb.nig.gl"

    It should always respond from the primary cluster.

  3. Take down the primary cluster:

    make stop-service CLUSTERID=1
  4. Observe the responses of the demo service:

    make repeat TIMES=10 COMMAND="make curl-resolved DOMAIN=demo.k8gb.nig.gl"

    It should now round-robin between the remaining clusters.

  5. Bring the cluster back up:

    make start-service CLUSTERID=1
  6. Observe the responses of the demo service:

    make repeat TIMES=10 COMMAND="make curl-resolved DOMAIN=demo.k8gb.nig.gl"

    It should always respond from the primary cluster.

About

Demo for the talk "Evaluating Global Load Balancing Options for Kubernetes in Practice" presented at ContainerDays 2025

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages