Incorrect node count in agent pool

Yaniv Tzur 5 Reputation points
2023-02-01T12:06:21.2933333+00:00

When using the "Managed Clusters - List" API to list all AKS clusters under our subscription, the node count for some agent pools, in some AKS clusters is higher by 1 than the actual value (but not all agent pools/clusters).
E.g., for a certain agent pool in a certain cluster, the output of the API shows the count is 3:

"agentPoolProfiles": [
    {
        "name": "agentpool",
        "count": 3,

However, the actual number of nodes in the agent pool is 2, as seen for example in the Azure portal (see below screenshot).
User's image

We've encountered the same issue in multiple AKS clusters.
Can you please answer what might cause this kind of discrepancy and how this might be resolved?

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,313 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Andrei Barbu 2,591 Reputation points Microsoft Employee
    2023-02-01T12:31:32.59+00:00

    Hello Yaniv!

    Thank you for raising this. I can confirm I concluded the same behavior on my side and seems the API is not showing the right value:

            "agentPoolProfiles": [
              {
                "name": "az",
                "count": 3,
    

    User's image

    User's image

    However, it seems the discrepancy only for one node pool, not all of them, at least on my side.

    As I am a Microsoft employee, I will check internally and get back to you, but I cannot guarantee an ETA.

    Additionally, if this is causing any business impact for you and you would like to report to support, feel free to open a support request.

    In any case, I will check and get back to you as soon as I have new information.

    In the meantime, let me ask you a question, please. You mentioned this issue happens for multiple AKS clusters. Is it happening for all your AKS clusters or a few of them? If only a few, is there any pattern? For example, is this happening on node pools with Availability Zones only?


    Later, if you will find this helpful, I will ask you to "Accept as Answer" and Upvote if it helped, so that it can help others in the community looking for help on similar topics.

    Thank you!


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.