kubernetes/kops · error
creating VMSS VMs client: %w
Error message
creating VMSS VMs client: %w
What it means
newClient constructs the armcompute VirtualMachineScaleSetVMsClient after the VM client. If SDK construction fails, the error is wrapped with 'creating VMSS VMs client'. Like the VM client, this is local construction and usually reflects invalid subscription input or an SDK issue.
Source
Thrown at pkg/nodeidentity/azure/client.go:61
return nil, fmt.Errorf("error querying instance metadata: %s", err)
}
if metadata.SubscriptionID == "" {
return nil, fmt.Errorf("empty subscription ID")
}
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
return nil, fmt.Errorf("creating identity: %w", err)
}
vmClient, err := compute.NewVirtualMachinesClient(metadata.SubscriptionID, cred, nil)
if err != nil {
return nil, fmt.Errorf("creating VMs client: %w", err)
}
vmssClient, err := compute.NewVirtualMachineScaleSetVMsClient(metadata.SubscriptionID, cred, nil)
if err != nil {
return nil, fmt.Errorf("creating VMSS VMs client: %w", err)
}
return &client{
vmClient: vmClient,
vmssClient: vmssClient,
}, nil
}
func (c *client) getVMTags(ctx context.Context, providerID string) (map[string]*string, error) {
if !strings.HasPrefix(providerID, "azure://") {
return nil, fmt.Errorf("unknown providerID : %s", providerID)
}
res, err := arm.ParseResourceID(strings.TrimPrefix(providerID, "azure://"))
if err != nil {
return nil, fmt.Errorf("error parsing providerID: %v", err)
}
View on GitHub (pinned to 4c8573c808)
Solutions
- Verify metadata.SubscriptionID is a valid GUID (the same value just succeeded for the VM client, so this is rare)
- Check go.mod / vendor for mixed azure-sdk-for-go versions; run go mod tidy and rebuild
- Inspect the wrapped error for the exact failure reason
- If transient SDK/resolver issues, retry cluster node startup
Defensive patterns
Strategy: validation
Validate before calling
if _, err := uuid.Parse(subscriptionID); err != nil {
return fmt.Errorf("invalid azure subscription ID %q: %w", subscriptionID, err)
} Try / catch
if err != nil {
return fmt.Errorf("creating VMSS VMs client: %w", err)
} Prevention
- Use the same validated subscription ID for all compute clients
- Keep azure-sdk-for-go compute module versions consistent
- Rebuild with go mod tidy if SDK versions drift
When it happens
Trigger: compute.NewVirtualMachineScaleSetVMsClient(metadata.SubscriptionID, cred, nil) returns a non-nil error — typically an invalid subscription ID format or SDK-level initialization failure.
Common situations: Malformed subscription ID from a partial IMDS response; SDK version incompatibilities in the compute arm package; identical root causes to the VMs client error since both take the same inputs.
Related errors
- unexpected subnet type: for InstanceGroup %q; type was %s
- malformed format of image urn: %s
- creating VMs client: %w
- creating VMSSs client: %w
- expected exactly one subnet for InstanceGroup %q; subnets wa
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/e84d9e9453c43511.
Report an issue: GitHub.