Loading...

AKS Networking || Bring your own CNI plugin (BYOC)

AKS Networking || Bring your own CNI plugin (BYOC)

Bring your own Container Network Interface (BYOCNI) plugin with Azure Kubernetes Service (AKS)

 

What is BYOCNI?
BYOCNI stands for Bring Your Own Container Network Interface. It allows advanced AKS users to deploy an AKS cluster with no CNI plugin preinstalled. Instead, you can install any third-party CNI plugin that works in Azure. This flexibility enables you to use the same CNI plugin used in on-premises Kubernetes environments or leverage advanced functionalities available in other CNI plugins.

 

Shyam_Yadav_0-1718163471408.png


Before diving into BYOCNI, ensure the following prerequisites are met:
- Use at least template version 2022-01-02-preview or 2022-06-01 for Azure Resource Manager (ARM) or Bicep.
- Have Azure CLI version 2.39.0 or later.
- The virtual network for the AKS cluster must allow outbound internet connectivity.
- Avoid using specific address ranges (e.g., 169.254.0.0/16, 172.30.0.0/16, 172.31.0.0/16, or 192.0.2.0/24) for Kubernetes service, pod address range, or cluster virtual network address range.
- The Identity used by the AKS cluster need to have least Network Contributor permissions on the subnet within your virtual network. Or you can use the custom role which has "Microsoft.Network/virtualNetworks/subnets/join/action and Microsoft.Network/virtualNetworks/subnets/read" permission.
- Subnet cannot be a delegated subnet used by AKS node pool.
- AKS doesn't apply NSGs to its subnet or modify any of the NSGs associated with that subnet. If you add custom NSGs to the subnet, ensure the security rules allow traffic within the node CIDR range.

 

Deploy AKS cluster with no CNI plugin preinstalled:

You can deploy the AKS cluster with different Infrastructure as code (IAC) and CLI. We just need to pass the network-plugin with the value as none. Refer the below snapping for the same.

 

1. Azure CLI:

Shyam_Yadav_1-1718163545222.png

2. Terraform: 

Shyam_Yadav_2-1718163844959.png

3. ARM template: 

Shyam_Yadav_3-1718163947010.png

4. Bicep:

Shyam_Yadav_4-1718163986488.png

 

Upon a successfully deployment you can see the AKS cluster is online, but all the nodes are not ready, you can check and verify the same on the azure poral as well as by running the kubectl commands as shown below,
Azure portal:

Shyam_Yadav_0-1718164990311.png

kubectl:

Shyam_Yadav_1-1718165131065.png

We can clearly see the reason:NetworkPluginNotReady in the blow snapping. 

Shyam_Yadav_1-1718165436858.png

Now to make the nodes ready we need to install the network plugin. To do so you can leverage BYOCNI plugin third-party vendor such as Cilium, Flannel and Weave. Apart from these three there are so many other 3rd party plugins as well. You can run the below command to install the network pluginIn my Case I have used Flannel.

kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml

 

After applying the above kubectl commands the nods are now in ready state as you can see below,

 

Shyam_Yadav_3-1718167183633.png

Portal:

Shyam_Yadav_0-1718167565418.png


Using kubectl:

Shyam_Yadav_4-1718167229656.png

 

Note:

Remember that Microsoft support cannot assist with CNI-related issues in clusters deployed with BYOCNI. For CNI-related support, consider using a supported AKS network plugin or seek support from the third-party vendor of your chosen CNI plugin. Support is still provided for non-CNI-related issues.

BYOCNI empowers you to tailor your AKS networking to your specific requirements.

 

Published on:

Learn more
Azure Infrastructure Blog articles
Azure Infrastructure Blog articles

Azure Infrastructure Blog articles

Share post:

Related posts

Enable IP restriction for a public facing App service

In this blog article, we will cover how to control the app service deployment to support only public facing app service with IP restriction en...

1 year ago

Selecting the Optimal Container for Azure AI: Docker, ACI, or AKS?

Deploying Azure AI services in containers like Docker, Azure Container Instances (ACI), or Azure Kubernetes Service (...

1 year ago

Securing Hardware and Firmware Supply Chains

In the modern cloud data center, ensuring the authenticity, integrity, and security of hardware and firmware is paramount. Firmware is the low...

1 year ago

Liquid Cooling in Air Cooled Data Centers on Microsoft Azure

With the advent of artificial intelligence and machine learning (AI/ML), hyperscale datacenters are increasingly accommodating AI accelerators...

1 year ago

Mt Diablo - Disaggregated Power Fueling the Next Wave of AI Platforms

Authors: Jason Adrian – General Manager, Azure Platform Architecture Laurentiu Olariu – Power Architect, Azure Platform Architecture Banha Sok...

1 year ago

Deny inbound NSG Rule creation via Azure Policy

  In this blog article, we will cover how to deny the creation of inbound Network Security Group Rules if the inbound NSG Rule contains&n...

1 year ago

Azure Extended Zones: Optimizing Performance, Compliance, and Accessibility

  Azure Extended Zones are designed to bring the power of Azure closer to end users in specific metropolitan areas or jurisdictions, cate...

1 year ago

Inside Maia 100: Revolutionizing AI Workloads with Microsoft's Custom AI Accelerator

Authored by: Sherry Xu, Partner Lead SoC Architect, Azure Maia Chandru Ramakrishnan, Partner Software Engineering Manager   As the advanc...

1 year ago

Accelerate Cloud Potential for Your SAP Workloads on Azure with these Learning Paths

  Accelerate Cloud Potential for Your SAP Workloads on Azure with these Learning Paths   In today's rapidly evolving digital landsc...

1 year ago

Azure Role Assignments Audit Report

Overview:  Azure Administrators often come across challenges while tracking multiple Azure role assignments and removals. At present Azur...

2 years ago

Newsletter

Get the latest Dynamics 365 and Power Platform content in your inbox

A curated digest of community blogs, product news, videos, and podcasts — delivered without the noise.

Weekly updates Unsubscribe anytime Fresh community picks
We use your email only for the newsletter and you can unsubscribe at any time.
By subscribing, you agree to the privacy policy.