kubernetes/kops · error
unable to find VM Scale Sets: %s
Error message
unable to find VM Scale Sets: %s
What it means
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.
Source
Thrown at upup/pkg/fi/cloudup/azure/status.go:131
}
// GetCloudGroups returns Cloud Instance Groups for the cluster
// by querying Azure.
func (c *azureCloudImplementation) GetCloudGroups(
cluster *kops.Cluster,
instancegroups []*kops.InstanceGroup,
warnUnmatched bool,
nodes []v1.Node,
) (map[string]*cloudinstances.CloudInstanceGroup, error) {
igsByName, err := keyedByName(instancegroups, cluster.Name)
if err != nil {
return nil, err
}
ctx := context.TODO()
vmsses, err := c.vmscaleSetsClient.List(ctx, cluster.AzureResourceGroupName())
if err != nil {
return nil, fmt.Errorf("unable to find VM Scale Sets: %s", err)
}
nodeMap := cloudinstances.GetNodeMap(nodes, cluster)
groups := make(map[string]*cloudinstances.CloudInstanceGroup)
for _, vmss := range vmsses {
if !isOwnedByCluster(vmss, cluster.Name) {
continue
}
ig, ok := igsByName[*vmss.Name]
if !ok {
if warnUnmatched {
klog.Warningf("Found VM Scale Set with no corresponding instance group %q", *vmss.Name)
}
continue
}
View on GitHub (pinned to 4c8573c808)
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
Defensive patterns
Strategy: retry
Validate before calling
if _, err := rgClient.Get(ctx, cluster.AzureResourceGroupName(), nil); err != nil {
return fmt.Errorf("cluster resource group %q not found: %w", cluster.AzureResourceGroupName(), err)
} Type guard
var respErr *azcore.ResponseError
if errors.As(err, &respErr) {
if respErr.StatusCode == http.StatusForbidden {
// missing Microsoft.Compute/virtualMachineScaleSets/read
}
} Try / catch
groups, err := cloud.GetCloudGroups(cluster, groups, nodes, instanceGroups)
if err != nil {
var respErr *azcore.ResponseError
if errors.As(err, &respErr) && respErr.StatusCode == 429 {
return retryAfterBackoff(ctx, respErr.RetryAfter)
}
return err
} Prevention
- Grant Microsoft.Compute/virtualMachineScaleSets/read to the identity
- Confirm the correct resource group before listing VMSS
- Add backoff retries for 429/5xx ARM responses
When it happens
Trigger: 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.
Common situations: kops rolling-update cluster on Azure with an identity lacking Compute read permissions; resource group renamed/deleted; subscription mismatch; Azure regional outage.
Related errors
- expected exactly one subnet for InstanceGroup %q; subnets wa
- unexpected subnet type: for InstanceGroup %q; type was %s
- instance group must have the same min and max size in Azure,
- malformed format of image urn: %s
- creating VMSS VMs client: %w
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/69d2c30448f1deeb.
Report an issue: GitHub.