Reading Time: 4 minutes
Share:
Twitter
LinkedIn
Facebook
Reddit
Whatsapp
Follow by Email

In the dynamic world of cloud computing and Kubernetes, Azure Kubernetes Service (AKS) has introduced an exciting public preview feature: Dual-Stack Networking in Azure CNI Overlay. This feature allows both IPv4 and IPv6 addresses to coexist in the same cluster, enhancing connectivity and preparing your infrastructure for the future. Let’s walk through the process of enabling this feature and deploying a dual-stack AKS cluster.

What is Dual-Stack Networking in Azure CNI Overlay for AKS?

Dual-stack networking allows both IPv4 and IPv6 addresses to coexist and function within the same AKS cluster. This new feature is a game-changer for organizations looking to modernize their applications and infrastructure. By supporting both IP address families, Azure CNI Overlay for AKS offers unparalleled flexibility and connectivity options, ensuring seamless communication with external systems that operate on either IPv4 or IPv6.

The Advantages of Dual-Stack Networking

  • Enhanced Flexibility: Dual-stack networking enables applications to be accessible over both IPv4 and IPv6, catering to a broader range of network environments.
  • Future-Proofing: With the gradual shift towards IPv6, this feature prepares your AKS deployments for future network standards.
  • Seamless Communication: Ensures uninterrupted communication with systems and services that are already operating on IPv6.

Prerequisites and Limitations

Before diving into this new feature, it’s important to understand the prerequisites and limitations:

  • Azure CLI 2.48.0 or later is required.
  • The feature is accessible after registering the Microsoft.ContainerService AzureOverlayDualStackPreview feature flag.
  • Your Kubernetes version must be 1.26.3 or greater.

However, note that there are certain limitations. As of now, dual-stack networking does not support:

  • Windows Node pools
  • Azure and Calico network policies
  • NAT Gateway
  • Virtual nodes add-on.

Enabling Dual-Stack Networking in AKS

To begin, you need to register the AzureOverlayDualStackPreview feature flag. This can be done using the Azure CLI as follows:

  1. You can access Azure Cloud Shell by navigating to https://shell.azure.com or via the Azure portal.
  2. Execute the following command:

This command registers the feature flag with your Azure subscription. It can take a short while to finish.

  1. Confirm that the registration is complete by running:

Wait until the status shows ‘Registered‘.

  1. After registration, refresh the Microsoft.ContainerService resource provider using:

Deploying a Dual-Stack AKS Cluster

Step 1: Create a Resource Group

First, create a resource group for your cluster in your preferred region:

Replace <region> and <resourceGroupName> with your desired Azure region and a name for the resource group.

Step 2: Create the Cluster

Now, create a dual-stack AKS cluster using the Azure CLI:

Replace <region>, <resourceGroupName>, and <clusterName> with your chosen values.

Deploying and Exposing a Workload

Let’s deploy an NGINX Web Server to test. but first we need to connect to the cluster.

  1. Use az aks get-credentials to connect to the cluster:
  1. Now we can use kubectl to create an NGINX deployment:
  1. Check the pod resources using:

The output will show pods with both IPv4 and IPv6 addresses.

Expose the Workload via LoadBalancer Services

  1. Expose the NGINX Deployment for IPv4 and IPv6:
  1. Once the services are provisioned, get their IP addresses:

This will display the external IP addresses for both IPv4 and IPv6 services.

Testing the Deployment

To confirm that everything is working as expected you can use a web browser or a tool like curl from an IPv6 capable host to access the NGINX server using the IPv6 service IP address. Unfortunately, Azure Cloud Shell doesn’t support IPv6, so this step needs to be performed from a capable environment.

By following these steps, you can successfully deploy a dual-stack AKS cluster and test its functionality with an example workload. Remember, this feature is in public preview and not recommended for production environments yet. Stay tuned for more updates and enhancements as Azure continues to evolve its Kubernetes service offerings.

Conclusion

The introduction of dual-stack support in Azure CNI Overlay for AKS is a significant step towards more versatile and future-proof networking in Kubernetes environments. While it’s important to be aware of its current limitations and prerequisites, the benefits it brings in terms of connectivity and flexibility are undeniable. As with any preview feature, remember that it’s not recommended for production use yet, but it’s certainly worth exploring for development and testing environments.

Share:
Twitter
LinkedIn
Facebook
Reddit
Whatsapp
Follow by Email

Pixel Robots.

I’m Richard Hooper aka Pixel Robots. I started this blog in 2016 for a couple reasons. The first reason was basically just a place for me to store my step by step guides, troubleshooting guides and just plain ideas about being a sysadmin. The second reason was to share what I have learned and found out with other people like me. Hopefully, you can find something useful on the site.

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *