Azure Insights: CNI for AKS; Assessing YAML and Helm charts for best practices

April 17 2022

Azure pros discuss new ways to set up Container Network Interfaces for Azure Kubernetes Service and managing YAML and Helm file best practices using Azure DevOps Pipelines with KubeLinter.

Setting up a bring your own Container Network Interface for Azure Kubernetes Service

Microsoft MVP Richard Hooper, writing on Pixel Robots, discussed a new preview option for Azure Kubernetes Service. For a long time, AKS only officially supported Kubenet and Azure CNI as its two Container Network Interface (CNI) options. However, on April 2, Microsoft launched the ability to create an AKS cluster without a CNI. This means that users will be able to choose whatever CNI they want.

In his blog post, Hooper advised users to make sure they are using the AKS preview CLI extension. With the correct version and preview extension set, users can move on to create the resource group. This involves the AKS create command. He demoed commands to connect to the new cluster. He wrote:

You will notice the status message of the nodes says container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized. It’s now time to install a CNI.

Hooper closed out the process with a walkthrough of how to complete the CNI setup, using cilium as the CNI of choice.

Using Azure DevOps Pipeline to assess YAML file and Helm chart best practices

Thomas Thornton discussed a situation where a large number of Helm charts and YAML files need to be deployed as part of a Kubernetes deployment. He recommends KubeLinter integrated with Azure DevOps Pipelines to ensure that the deployments meet best practices. KubeLinter is a static analysis tool that can check both YAML and Helm files, running default checks for best practices. Alternatively, users can disable the checks to control deployments manually.

Fortunately, there are plenty of ways to setup KubeLinter including with Homebrew, Go, GitHub Actions, and Docker. To demonstrate the process, Thornton relied on two example files offered by KubeLinter, comparing YAML with and without best practices. Sometimes, individual recommended best practices may not be usable. Often challenges crop up around CPU and memory utilization. Users should review the full list of KubeLinter default checks to find out more.

About MSCN Reporter

More about MSCN Reporter