Cilium BGP Lab

Sure, here is the blog post based on the information provided:

Reaching Kubernetes Apps with Cilium and BGP Peering

=====================================================

In our previous article, we set up a KinD cluster with Cilium and created a BGP peering with our routers. Now, we want to explore how to reach our Kubernetes apps using the Pod IP address or a LoadBalance IP assigned to a Service. We’ll also cover how to validate the configurations and test our application using curl and Lynx.

Adding More Configurations to Our KinD Cluster

———————————————

When using Cilium, we can reach an application using the Pod IP address or a LoadBalance IP assigned to a Service. In our previous article, we only advertised the Pod address to our BGP neighbors. Let’s add more configurations to our KinD cluster so we can be close to a real deployment.

Building the Environment with Make

—————————————

As before, let’s build the environment using `make`. This will create a KinD cluster with 4 nodes (1 control-plane and 3 workers), a containerlab topology with 3 routers (FRR), and 1 client (Alpine). We can decide to install Cilium manually or use `make cilium` to automate the process.

Applying CiliumBGPPeeringPolicy and CiliumLoadBalancerIPPool

———————————————————–

Now that we have our KinD cluster set up, let’s apply both the `CiliumBGPPeeringPolicy` and `CiliumLoadBalancerIPPool` configurations. We can do this using `make` or the official way with `kubectl`.

Validating Configurations and Testing Applications

————————————————–

Let’s validate our configurations using the following commands:

“`

make verify-config

kubectl get pods,services,endpoints

“`

Our lab environment is ready to assign IP to LoadBalancer services. Let’s check the existing ones first:

“`

kubectl get services

“`

There is our LoadBalancer IP address (10.0.10.1) and others ClusterIP. The LoadBalancer is the one that we will be testing from client0.

Testing Our Application with curl and Lynx

—————————————–

We can test our application using `curl` and Lynx. First, let’s install these tools in client0:

“`bash

apk add –no-cache curl lynx

“`

Now, let’s reach our app using `lynx`:

“`bash

lynx http://10.0.10.1

“`

We can see that `curl` is reaching the app, but it’s hard to interact with the application using only `curl`. Let’s try using Lynx instead!

Isovalent Announces Support for ClusterIP in BGP!

———————————————-

Isovalent, the creators of Cilium, have recently announced support for ClusterIP in BGP! This means that our KinD cluster is ready to use ClusterIP addresses for LoadBalancer services. Let’s take advantage of this new feature and test our application using both `curl` and Lynx.

Conclusion

———-

In this article, we explored how to reach Kubernetes apps using the Pod IP address or a LoadBalance IP assigned to a Service with Cilium and BGP peering. We also covered how to validate the configurations and test our application using curl and Lynx. With the recent announcement of support for ClusterIP in BGP, our KinD cluster is ready to use ClusterIP addresses for LoadBalancer services.

We hope this article has been helpful in understanding how to reach Kubernetes apps with Cilium and BGP peering. If you have any questions or would like to learn more about Cilium and KinD, please visit our website at [www.arielantigua.com/weblog](http://www.arielantigua.com/weblog).