With Cilium 1.16, the Cilium Gateway API now supports the GAMMA framework and can be used for East-West use cases, providing a common API for common service mesh use cases. GAMMA stands for "Gateway API for Mesh Management and Administration" and provides a consistent model to provide east-west traffic management for the cluster, such as path-based routing and load-balancing internally within the cluster. Watch this video to learn more. Introduction Today I'm going to talk about Cilium support for GAMMA, which is coming in Cilium 1.16. Now, what is GAMMA? GAMMA is a subproject of Gateway API. I've done lots of videos about Gateway API, which is a long-term successor to Ingress and lets us load balance and apply traffic management as traffic enters a Kubernetes cluster. Gateway API is typically for north-south traffic, so traffic coming from outside your cluster and entering through a gateway. GAMMA is for east-west use cases. It stands for Gateway API for Mesh Management and Administration. What GAMMA is The idea is to apply the same portable standard from Gateway API, but for service mesh use cases inside the cluster. If you recall, with Gateway API we can do things like path-based routing, header-based routing, redirects, and HTTP header manipulation for incoming traffic. Now we want to apply the same logic for traffic within the cluster, so that's what we're going to do in the demo. In previous Gateway API demos, we had two basic things: the Gateway resource itself and HTTPRoutes attached to that Gateway. Gateway API recap That Gateway might listen on port 80 or 443, and the route would then send traffic addressed to the gateway IP to a specific service. For GAMMA, we still use similar HTTPRoute objects, but for east-west traffic. I've deployed a client pod in my gamma namespace, and we're going to do path-based routing for traffic internal to the cluster. When the client makes a curl request to Echo v1, we'll send it to Echo v1, and when it calls Echo v2, we'll send it to Echo v2. The main difference is that we're not attaching the route to a Gateway. We're attaching it to a Service, what we call a parent service. Parent service model When an internal pod sends traffic to this service, Cilium intercepts it, sends it to the Envoy proxy running on the node, and then routes the traffic accordingly. Let's go ahead and deploy it and do some tests so you can see how the traffic is manipulated by Cilium and Envoy. We've deployed our routes. Now I'm going into the client and starting some curl requests. If I curl Echo v1, the echo server replies with its own hostname, so we can see the request was routed to the Echo v1 service as expected. GAMMA route configuration If I do the same thing to Echo v2, it gets sent to Echo v2. So this is successful path-based routing using a GAMMA route, and I haven't installed any separate ingress or service mesh. Now let's explore load balancing. The manifest is pretty straightforward and easy to read. If we send traffic to the load-balancing path here, we'll send 50% toward the Echo v1 service and 50% to the Echo v2 service. Again, unlike the previous Gateway API demos, we're not attaching this route to the Gateway. We're attaching it to the parent service. Let's apply this manifest and run a similar test from the client with a loop of 500 requests. We can see it's roughly 50/50 between Echo v1 and Echo v2, so there's some load balancing happening, exactly as we expect. Now let's change that slightly to 90/10. This is the kind of use case where you introduce a new version of an application and want to see how users react to it. You can send 1%, 5%, or 10% of the traffic to the new application and see how users like it, so I'm just going to change the weight. Traffic splitting demo Again, we're running another loop, and let's count. There we go. We see about 90% of the traffic sent to one service and about 10% sent to the other one. So this is the use case where you force a small percentage of traffic to a beta or new version of your application. There are lots of other potential GAMMA use cases. This is really for east-west traffic management. Things like HTTP path-based routing, header-based routing, load balancing, and other Gateway API concepts that you would normally use north-south should now also work for east-west traffic. That should make traffic management inside your cluster much easier. This is coming out with Cilium 1.16. I hope you found this useful. Thanks very much for watching.