Multi-cluster Kubernetes load balancing in AWS with Yggdrasil

Joseph Irving
Aug 7, 2018 · 5 min read
Image for post
Image for post
Yggdrasil, from Norse mythology, is the world tree that links the nine realms.

The proposal

We decided early on that we wanted the solution to build on top of things that were already familiar to developers. We didn’t want deploying an application to multiple clusters to be vastly different from deploying to a single one.

Image for post
Image for post
Image for post
Image for post
Image for post
Image for post

Enter Yggdrasil

Envoy was built with the idea of it being able to dynamically discover configuration via GRPC. This is where Yggdrasil comes in. Yggdrasil is an Envoy control plane, generating configuration for Envoy dynamically from Ingress objects in a Kubernetes cluster. It regularly searches for Ingresses of a specific class and will use the host and load balancer address from the Ingress object to create Envoy config, it will then combine Ingresses from different clusters with the same host together. The Envoy nodes are then deployed with very minimal config; they’re just pointed at Yggdrasil as a source of dynamic config.

Image for post
Image for post

What’s next

Yggdrasil allowed us to get load balancing across our clusters in a fairly simple way that did not require us to change the way our clusters were set up, or create more methods of communication between them.


uswitch-labs

Thoughts, stories and ideas in from uSwitch products

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store