# Kubernetes tip 1: Specify max pods for the user node pool (AKS)

You create a user nodepool in your AKS cluster with CNI overlay. All fine you think after it runs and you scheduled your pods on it. But then you noticed that you cannot schedule more than 30 pods on it!

You can't change max-pods on an existing AKS node pool. It's baked in at creation time.

The default (Azure CNI):

- User node pool: 30 pods/node (pre-reserves 31 IPs per node)
- System node pools: have default 110 pods/node

Why 30 is painful:

With DaemonSets consuming around 10 pod slots, you're left with ~20 slots for actual workloads.

The only fix:

Create a new node pool with `--max-pods <new-value>` and migrate your workloads using node selectors.

My conclusion:

I'm setting max pods to 150. Why?

- CPU/memory should be the scheduling constraint, not an arbitrary pod limit
- My subnet has massive headroom → IP exhaustion isn't a concern
- Room for tiny pods → If I add smaller workloads later, no refactor needed
- max pods only matters when subnet is small → On /24, it's critical. On /16, it's irrelevant

![AKS cluster max-pods diagram](https://images.koorevaar.com/linkedin-import/aks-max-pods-tip-1.jpg)

---

*Co-authored with Claude.*

If this was useful, [you can buy me a coffee](https://ko-fi.com/p47k0).

New articles: [follow via RSS](https://blog.koorevaar.com/feed.xml).
