# Future-Proof Your AKS Cluster with Strategic IP Address Planning

DevFeed: [Future-Proof Your AKS Cluster with Strategic IP Address Planning](<https://devfeed.tech/articles/future-proof-your-aks-cluster-with-strategic-ip-address-planning-20138.md>)

Original publisher: [Read original article](<https://medium.com/myntra-engineering/future-proof-your-aks-cluster-with-strategic-ip-address-planning-01e4ea04e197?source=rss----7484818e9f88---4>)

Author: Sumit Prasad

Published: 2024-06-25T09:12:09Z

Content type: article

Language: en

Sources: [Myntra](<https://devfeed.tech/sources/myntra.md>)

Topics: [ip-address-planning](<https://devfeed.tech/topics/ip-address-planning.md>), [Azure Kubernetes Service](<https://devfeed.tech/topics/azure-kubernetes-service.md>), [Network](<https://devfeed.tech/topics/network.md>), [CIDR and subnets](<https://devfeed.tech/topics/cidr-and-subnets.md>), [container-networking](<https://devfeed.tech/topics/container-networking.md>)

Tags: [aks](<https://devfeed.tech/tags/aks.md>), [azure](<https://devfeed.tech/tags/azure.md>), [azure-kubernetes-service](<https://devfeed.tech/tags/azure-kubernetes-service.md>), [bottlenecks](<https://devfeed.tech/tags/bottlenecks.md>), [buffer](<https://devfeed.tech/tags/buffer.md>), [cluster](<https://devfeed.tech/tags/cluster.md>), [cni](<https://devfeed.tech/tags/cni.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [container-networking](<https://devfeed.tech/tags/container-networking.md>), [environment](<https://devfeed.tech/tags/environment.md>), [ip](<https://devfeed.tech/tags/ip.md>), [ip-address-planning](<https://devfeed.tech/tags/ip-address-planning.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [kubernetes-scaling](<https://devfeed.tech/tags/kubernetes-scaling.md>), [performance](<https://devfeed.tech/tags/performance.md>), [planning](<https://devfeed.tech/tags/planning.md>), [pods](<https://devfeed.tech/tags/pods.md>), [production](<https://devfeed.tech/tags/production.md>), [resource-utilization](<https://devfeed.tech/tags/resource-utilization.md>), [robust](<https://devfeed.tech/tags/robust.md>), [scalability](<https://devfeed.tech/tags/scalability.md>), [scaling](<https://devfeed.tech/tags/scaling.md>), [static](<https://devfeed.tech/tags/static.md>)

## AI overview

In AKS with default Azure CNI networking, subnet capacity planning must account for Pods, Nodes, and internal LoadBalancer services. Static allocation reserves IPs according to the configured maximum Pods per node, regardless of actual use: the excerpt's example of 10 nodes capped at 20 Pods reserves 200 Pod IPs plus 10 node IPs upfront, so unused capacity can be wasted. It suits stable workloads with predictable per-node Pod limits. Dynamic allocation assigns additional IPs as needed and can reduce waste under changing workloads, but requires a carefully planned subnet with buffer space. The excerpt recommends deciding the maximum Pods per node and dedicating a subnet CIDR before creating a node pool; it does not provide the remaining details of the approaches.

## Source excerpt

Scaling Kubernetes efficiently is an art that blends strategic planning with technical expertise. In Azure Kubernetes Service (AKS), mastering the allocation of IP addresses is crucial for ensuring seamless scalability and optimal performance. When configuring an AKS cluster with default Azure CNI networking, it's essential to address the nature of scaling Pods, Nodes, and internal LoadBalancer-type services. This blog delves into the intricate process of IP address planning, explicitly focusing on scaling Pods, Nodes, and Services in an AKS cluster. Discover how thoughtful IP management can prevent bottlenecks, optimize resource utilization, and pave the way for a robust production environment. Image Source: https://kubernetes.io/docs/images/kubernetes-cluster-network.svg We'll talk about two approaches to IP address planning in AKS: Static IP allocation and Dynamic IP allocation. Let us understand a bit about both, and then we will go deeper to understand each approach. Static IP Allocation: Suitable for predictable and stable environments where the maximum number of pods per node is known and does not change frequently. This approach can lead to IP wastage if the number of pods varies. Dynamic IP Allocation: Better for environments with varying workloads and dynamic scaling needs. It helps reduce IP wastage by allocating additional IPs only when necessary, but it requires careful subnet planning with a buffer to accommodate dynamic allocations. Static IP Allocation The default configuration in AKS uses static IP allocation based on the 'maximum number of pods per node' setting, counting all pods created from Deployments, Daemonsets, Statefulsets, or Jobs. The private subnet CIDR specified during node pool configuration assigns IP addresses to Pods, Nodes, and Load balancer type services for an internal network. It is essential to decide the "maximum pods per node" configuration and to have a dedicated subnet CIDR range before creating a node pool. AKS reserves th