{"record":{"id":"69d2c30448f1deeb","repo":"kubernetes/kops","slug":"unable-to-find-vm-scale-sets-s","errorCode":null,"errorMessage":"unable to find VM Scale Sets: %s","messagePattern":"unable to find VM Scale Sets: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/azure/status.go","lineNumber":131,"sourceCode":"}\n\n// GetCloudGroups returns Cloud Instance Groups for the cluster\n// by querying Azure.\nfunc (c *azureCloudImplementation) GetCloudGroups(\n\tcluster *kops.Cluster,\n\tinstancegroups []*kops.InstanceGroup,\n\twarnUnmatched bool,\n\tnodes []v1.Node,\n) (map[string]*cloudinstances.CloudInstanceGroup, error) {\n\tigsByName, err := keyedByName(instancegroups, cluster.Name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tctx := context.TODO()\n\tvmsses, err := c.vmscaleSetsClient.List(ctx, cluster.AzureResourceGroupName())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to find VM Scale Sets: %s\", err)\n\t}\n\n\tnodeMap := cloudinstances.GetNodeMap(nodes, cluster)\n\n\tgroups := make(map[string]*cloudinstances.CloudInstanceGroup)\n\tfor _, vmss := range vmsses {\n\t\tif !isOwnedByCluster(vmss, cluster.Name) {\n\t\t\tcontinue\n\t\t}\n\n\t\tig, ok := igsByName[*vmss.Name]\n\t\tif !ok {\n\t\t\tif warnUnmatched {\n\t\t\t\tklog.Warningf(\"Found VM Scale Set with no corresponding instance group %q\", *vmss.Name)\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/azure/status.go#L113-L149","documentation":"GetCloudGroups fails when c.vmscaleSetsClient.List cannot enumerate VM Scale Sets in the cluster resource group. Cloud groups (instance groups mapped to VMSS) are required for rolling updates and drain logic, so the operation aborts.","triggerScenarios":"vmscaleSetsClient.List(ctx, cluster.AzureResourceGroupName()) returns error: missing Microsoft.Compute/virtualMachineScaleSets/read permission, resource group not found beyond the client's tolerance, throttling, or transient ARM errors.","commonSituations":"kops rolling-update cluster on Azure with an identity lacking Compute read permissions; resource group renamed/deleted; subscription mismatch; Azure regional outage.","solutions":["Grant the identity Microsoft.Compute/virtualMachineScaleSets/read (Reader/Contributor) on the resource group","Confirm the cluster's AzureResourceGroupName is correct and exists","Retry on throttling (429) honoring Retry-After","Check Azure status for ARM outages if errors are transient 5xx"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if _, err := rgClient.Get(ctx, cluster.AzureResourceGroupName(), nil); err != nil {\n\treturn fmt.Errorf(\"cluster resource group %q not found: %w\", cluster.AzureResourceGroupName(), err)\n}","typeGuard":"var respErr *azcore.ResponseError\nif errors.As(err, &respErr) {\n\tif respErr.StatusCode == http.StatusForbidden {\n\t\t// missing Microsoft.Compute/virtualMachineScaleSets/read\n\t}\n}","tryCatchPattern":"groups, err := cloud.GetCloudGroups(cluster, groups, nodes, instanceGroups)\nif err != nil {\n\tvar respErr *azcore.ResponseError\n\tif errors.As(err, &respErr) && respErr.StatusCode == 429 {\n\t\treturn retryAfterBackoff(ctx, respErr.RetryAfter)\n\t}\n\treturn err\n}","preventionTips":["Grant Microsoft.Compute/virtualMachineScaleSets/read to the identity","Confirm the correct resource group before listing VMSS","Add backoff retries for 429/5xx ARM responses"],"tags":["azure","vmss","cloud-groups","scaling"],"backgroundTag":"azure-list-resources-failed","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}