Limitation of number of pods per node on aks

5/30/2018

can we set the maximum of pods per node smaller than 30?

We would like to use a /27 subnet which means there are only 30 usable IPs.

Right now we get the following error message:

Pre-allocated IPs 31 exceeds IPs available in Subnet 27

-- Chris J.
azure-aks
azure-container-service
azure-kubernetes

1 Answer

5/30/2018

You can modify the maxPods property of your cluster when deploying an AKS cluster from an ARM template. You'll do this inside the agentPoolProfile section of your cluster. Here's an example snippet:

{
  "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1",
  "type": "Microsoft.ContainerService/ManagedClusters"
  "location": "eastus",
  "name": "mycluster1",
  "properties": {
    "agentPoolProfiles": [
      {
        "count": 3,
        "dnsPrefix": "agentpool1dnsPrefix",
        "fqdn": "agentpool1fqdn",
        "name": "agentpool1",
        "osType": "Linux",
        "storageProfile": "ManagedDisks",
        "vmSize": "Standard_D2_v2",
        "maxPods": 25
      }
    ],
    // cut for brevity
}

As of 2018-05-30, the PR for the updated OpenAPI spec hasn't been merged yet, but you can find the relevant fields there

There's also a full sample template that includes maxPods at github.com/Azure/AKS/examples/vnet/02-aks-custom-vnet.json

-- acanthamoeba
Source: StackOverflow