Are pods automatically generated by AKS included in "MaxPods"?

松田 一志 21 Reputation points
Jul 14, 2022, 2:48 AM

I asked the question because it wasn't mentioned.("https://video2.skills-academy.com/ja-jp/azure/aks/configure-azure-cni")

The following pods are assumed to be automatically generated by AKS.


kubectl get pods -n kube-system

azure-ip-masq-agent-m5j4g 1/1 Running 0 41h
azure-ip-masq-agent-pckvq 1/1 Running 0 41h
azure-ip-masq-agent-sn5lj 1/1 Running 0 41h
azure-npm-v9nvh 1/1 Running 0 2d2h
azure-npm-wwqdv 1/1 Running 0 2d2h
azure-npm-znw6v 1/1 Running 0 2d2h
cloud-node-manager-9kbgx 1/1 Running 0 2d2h
cloud-node-manager-b78cd 1/1 Running 0 2d2h
cloud-node-manager-hn4n8 1/1 Running 0 2d2h
coredns-autoscaler-7d56cd888-zkc6r 1/1 Running 0 2d13h
coredns-dc97c5f55-lttl2 1/1 Running 0 2d13h
coredns-dc97c5f55-nxmpc 1/1 Running 0 2d13h
csi-azuredisk-node-8jbjq 3/3 Running 0 2d2h
csi-azuredisk-node-clx57 3/3 Running 0 2d2h
csi-azuredisk-node-qg78h 3/3 Running 0 2d2h
csi-azurefile-node-c7zmn 3/3 Running 0 2d2h
csi-azurefile-node-jjls4 3/3 Running 0 2d2h
csi-azurefile-node-kf5np 3/3 Running 0 2d2h
konnectivity-agent-5b57c87479-jjbcv 1/1 Running 0 41h
konnectivity-agent-5b57c87479-zkcgj 1/1 Running 0 41h
kube-proxy-gpw9c 1/1 Running 0 2d2h
kube-proxy-jfnnd 1/1 Running 0 2d2h
kube-proxy-sdx45 1/1 Running 0 2d2h
metrics-server-64b66fbbc8-g94nw 1/1 Running 1 (2d2h ago) 2d13h
metrics-server-64b66fbbc8-gzcwc 1/1 Running 1 (2d2h ago) 2d13h

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,160 questions
0 comments No comments
{count} votes

Accepted answer
  1. shiva patpi 13,256 Reputation points Microsoft Employee
    Jul 14, 2022, 4:28 PM

    Hello @松田 一志 ,
    Regarding your follow-up question :
    The minimum value for MaxPods in Azure CNI should be 30. AKS cluster creation will fail

    Couple of additional tests using Portal & CLI , below are the results:

    Using Portal:

    The minimum required number of pods for a system node pool is 30. With 1 node as the minimum scale value, the minimum pods per node is 30

    220861-image.png

    Using Azure CLI

    {'code': 'InvalidTemplateDeployment', 'message': "The template deployment 'akswithmingroup' is not valid according to the validation procedure. The tracking id is '56512550-e4ff-4d36-8dc8-999b382216b2'. See inner errors for details."}

    Inner Errors:
    {'code': 'InsufficientAgentPoolMaxPodsPerAgentPool', 'message': "Provisioning of resource(s) for container service maxpodsdemo in resource group maxpodsdemo failed. Message: Category: ClientError; Code: InsufficientAgentPoolMaxPodsPerAgentPool; SubCode: ; Message: The AgentPoolProfile 'maxpodsdemo' has an invalid total maxPods(maxPods per node * node count), the total maxPods(10 * 1) should be larger than 30. Please refer to aka.ms/aks-min-max-pod for more detail.; InnerMessage: ; Dependency: ; OrginalError: %!s(<nil>); AKSTeam: . Details: "}

    Official Microsoft document : aka.ms/aks-min-max-pod

    Below highlighted 4 lines confirms the same.

    220822-image.png

    If you want to use minimum MaxPods count per node as 10 , then there should be a minimum of 3 nodes

    agentPoolProfiles: [
    {
    name: clusterName
    count: nodeCount
    vmSize: vmSize
    mode: 'System'
    maxPods: 10
    maxCount: 3
    minCount: 3
    enableAutoScaling: true
    }

    //////////////////

    Kindly let us know if you have additional questions , happy to help out further !

    Regards,
    Shiva.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. shiva patpi 13,256 Reputation points Microsoft Employee
    Jul 14, 2022, 5:19 AM

    Hello @松田 一志 ,
    That's correct ! all the system pods are also included in the MaxPods count. I just cross checked locally by creating an AKS cluster with 1 Node and MaxPods as 30.
    I was able to create only 17 application pods and remaining are system pods in kube-system namespace

    If we try to create a new pod after MaxPods are reached , it will show as "Too many pods"

    Events:
    Type Reason Age From Message


    Warning FailedScheduling 30s default-scheduler 0/1 nodes are available: 1 Too many pods.

    Kindly let us know if you have additional questions !

    Regards,
    Shiva.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.