kubernetes/kops · error

creating VMSS VMs client: %w

Error message

creating VMSS VMs client: %w

What it means

Wraps the compute.NewVirtualMachineScaleSetVMsClient construction failure, which builds the ARM client from the subscription ID and DefaultAzureCredential. Fires when the Azure SDK cannot be initialized — most commonly an invalid subscription ID or missing/unresolvable credentials (env vars, managed identity, CLI login).

Source

Thrown at upup/pkg/fi/cloudup/azure/vmscalesetvm.go:66

	}
	return l, nil
}

func (c *vmScaleSetVMsClientImpl) Delete(ctx context.Context, resourceGroupName, vmssName, instanceId string) error {
	future, err := c.c.BeginDelete(ctx, resourceGroupName, vmssName, instanceId, nil)
	if err != nil {
		return fmt.Errorf("deleting VMSS VM: %w", err)
	}
	if _, err = future.PollUntilDone(ctx, nil); err != nil {
		return fmt.Errorf("waiting for VMSS VM deletion completion: %w", err)
	}
	return nil
}

func newVMScaleSetVMsClientImpl(subscriptionID string, cred *azidentity.DefaultAzureCredential) (*vmScaleSetVMsClientImpl, error) {
	c, err := compute.NewVirtualMachineScaleSetVMsClient(subscriptionID, cred, nil)
	if err != nil {
		return nil, fmt.Errorf("creating VMSS VMs client: %w", err)
	}
	return &vmScaleSetVMsClientImpl{
		c: c,
	}, nil
}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Verify AZURE_SUBSCRIPTION_ID is a valid GUID
  2. Authenticate via az login or set AZURE_CLIENT_ID/AZURE_TENANT_ID/AZURE_CLIENT_SECRET
  3. If using managed identity, confirm it is assigned to the running machine
  4. Check the wrapped error for which credential chain step failed
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/azure/vmscalesetvm.go:66 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/f9986824cea3af6e. Report an issue: GitHub.