Hello Harshadbhai, Kothiya Meetkumar,
Thank you for posting your query on the Microsoft Q&A platform. Unfortunately, if your cluster is currently using the kubenet networking plugin, there is no fully supported path to flip to Azure CNI Overlay via a simple CLI update (like az aks update) without recreating or migrating the cluster. The official document states that you can update an existing Azure CNI cluster to Overlay mode, given certain prerequisites (Kubernetes version 1.22+, no network policies enabled, etc). But the GitHub issue confirms that clusters using kubenet do not have a supported migration path to Overlay mode today: “Today you cannot migrate Kubenet to Azure CNI overlay. A new cluster is required.”
So, in your case the safe and supported recommendation is to create a new AKS cluster with Azure CNI Overlay mode and migrate workloads rather than expecting to update the existing one. But if you still want to proceed with the migration then first decide on the pod CIDR for your overlay cluster. The overlay model requires a private CIDR that does not overlap with your node subnets, VNet peerings, on-prem networks, review your ingress, egress, IP restrictions, node-pools, network policies and last but not least evaluate the downtime tolerances in your scenario.
However, since your cluster uses kubenet, the safe path is to build a new cluster with Azure CNI Overlay and migrate your workloads. Kindly checkout these documents for your ease.
https://learn.microsoft.com/en-us/azure/aks/azure-cni-overlay?tabs=kubectl
https://learn.microsoft.com/en-us/azure/aks/upgrade-azure-cni?tabs=azure-cni
https://learn.microsoft.com/en-us/azure/aks/concepts-network-legacy-cni
If you found this information helpful, please consider accepting the answer and upvoting it.