Routing ALB Traffic With A Header

Say you’re using the AWS LB Controller and want to route traffic to specific hosts based on a header.

You can do that with some annotations on your ingress. See these docs.

This is useful if you want to route traffic to different Kubernetes services. For example, you might have two versions of a service, each with different sets of feature toggles. You send everybody that doesn’t have a header set to the default service, and requests with the header set to your experiment service.

Join the 80/20 DevOps Newsletter

If you're an engineering leader or developer, you should subscribe to my 80/20 DevOps Newsletter. Give me 1 minute of your day, and I'll teach you essential DevOps skills. I cover topics like Kubernetes, AWS, Infrastructure as Code, and more.

Not sure yet? Check out the archive.

Unsubscribe at any time.