Tanzu Kubernetes Grid Ingress With NSX Advanced Load Balancer

NSX ALB delivers scalable, enterprise-class container ingress for containerized workloads running in Kubernetes clusters. The biggest advantage of using NSX ALB in a Kubernetes environment is that it is agnostic to the underlying Kubernetes cluster implementations. The NSX ALB controller integrates with the Kubernetes ecosystem via REST API and thus can be used for ingress & L4-L7 load balancing solution for a wide variety of Kubernetes implementation including VMware Tanzu Kubernetes Grid.

NSX ALB provides ingress and load balancing functionality for TKG using AKO which is a Kubernetes operator that runs as a pod in the Tanzu Kubernetes clusters and translates the required Kubernetes objects to Avi objects and automates the implementation of ingresses/routes/services on the Service Engines (SE) via the NSX ALB Controller.

The diagram below shows a high-level architecture of AKO interaction with NSX ALB.

AKO interacts with the Controller & Service Engines via API to automate the provisioning of Virtual Service/VIP etc. Each Tanzu Kubernetes Cluster will have an instance of AKO running after the cluster is deployed with NSX ALB settings. 

If you are new to AKO and looking for installation steps, please have a look at my previous article on this topic. 

AKO and TKG Relationship

When you deploy the TKG Management cluster with NSX ALB as the load balancer, the AKO Operator gets automatically deployed and is responsible for automating the deployment of AKO pods in the workload cluster. 

AKOO doesn’t need a Service Engine because the management cluster does not need to run any ingress service. 

You can have more than one Tanzu Kubernetes cluster in your environment and based on your requirement, the clusters can share an AKO configuration or each cluster will have its own AKO configuration. If you are going for a multi-AKO configuration design, you require more Service Engines and Service Engine Groups because AKO configuration is tied to a SE/SE Group. 

Here is an example of AKO running in a Tanzu Kubernetes cluster. 

To demonstrate the ingress functionality, I am using a deployment yaml created by @Trevor Spires

On applying the yaml in my workload cluster, the following items got provisioned. 

In the above deployment, there are 2 websites. One is accessed via https://<site-url>/ and the other (old) one is accessed over https://<site-url>/old.

The following ingress is also provisioned on applying the deployment yaml.

A new Virtual Service/VIP is created in the NSX ALB.

To access the newer version of the site, hit the root URL of the website. 

To access the older version, access the site as shown below. Although nothing is currently provisioned, you can see ALB is steering the traffic to an older Nginx version. 

That’s it for this post. I hope you enjoyed reading this post. Feel free to share this on social media if it is worth sharing.

Leave a ReplyCancel reply