I am new to Kusto. I need an query to get the current node count of all the running Azure kubernetes clusters. I have tried with below but for few clusters it is giving node count 0 where as mode is present on those
Resources
| where type == "microsoft.containerservice/managedclusters"
| extend nodepools = properties.agentPoolProfiles
| mv-expand nodepools
| project name, nodepools.name, nodepools.vmSize, nodepools.minCount, nodepools.maxCount, nodepools.powerState.code,nodeCount = tostring(nodepools['count'])
| sort by name