kubernetes/kops · error

found VMSS without Linux config

Error message

found VMSS without Linux config

What it means

kOps manages Linux-based nodes, so Find() requires the VMSS osProfile.linuxConfiguration to be set in order to extract SSH settings. If the Azure API returns a scale set without LinuxConfiguration (e.g. it uses Windows, password auth, or an empty osProfile), kOps cannot reconcile it and returns this error.

Solutions

  1. Verify the VMSS belongs to this kops cluster: `az vmss show -g <rg> -n <vmss>` and check tags/naming; correct the cluster config if kops is looking at the wrong scale set.
  2. Recreate the scale set from the kops spec: run `kops update cluster --yes` (or `kops rolling-update cluster`) so it is provisioned with linuxConfiguration and SSH keys.
  3. If a custom node image/template dropped linuxConfiguration, fix the template to include linuxConfiguration.disablePasswordAuthentication=true and ssh publicKeys.
  4. Never hand-edit VMSS osProfile in kops-managed clusters.

Example fix

// before (ARM/osProfile)
"osProfile": { "adminUsername": "azureuser", "computerNamePrefix": "nodes" }
// after
"osProfile": { "adminUsername": "azureuser", "computerNamePrefix": "nodes", "linuxConfiguration": { "disablePasswordAuthentication": true, "ssh": { "publicKeys": [ { "path": "/home/azureuser/.ssh/authorized_keys", "keyData": "ssh-rsa AAAA..." } ] } } }
Defensive patterns

Strategy: validation

Validate before calling

func validateLinuxOSProfile(vmss *compute.VirtualMachineScaleSet) error {
  os := vmss.Properties.VirtualMachineProfile.OSProfile
  if os == nil || os.LinuxConfiguration == nil {
    return fmt.Errorf("VMSS %s lacks linuxConfiguration", fi.ValueOf(vmss.Name))
  }
  return nil
}

Type guard

func hasLinuxConfig(os *compute.VirtualMachineScaleSetOSProfile) bool {
  return os != nil && os.LinuxConfiguration != nil
}

Try / catch

vmss, err := tasks.Find(ctx, cloud, rg, name)
if err != nil {
  if strings.Contains(err.Error(), "without Linux config") {
    // rebuild the scale set via kops update cluster
  }
  return err
}

Prevention

When it happens

Trigger: Find() on a VMSS whose virtualMachineProfile.osProfile.linuxConfiguration is nil — Windows image scale sets, scale sets configured with password-only auth, or resources created outside kops without linuxConfiguration.

Common situations: A VMSS in the kops-managed resource group was created/modified by hand or by another tool with Windows or password-based osProfile; kops pointing at the wrong resource group/cluster and picking up a foreign VMSS.

Related errors


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

Appendix: source

Thrown at upup/pkg/fi/cloudup/azuretasks/vmscaleset.go:169

		return nil, fmt.Errorf("failed to parse subnet ID %s", *ipConfig.Properties.Subnet.ID)
	}

	var loadBalancerID *azure.LoadBalancerID
	if ipConfig.Properties.LoadBalancerBackendAddressPools != nil {
		for _, i := range ipConfig.Properties.LoadBalancerBackendAddressPools {
			if !strings.Contains(*i.ID, "api") {
				continue
			}
			loadBalancerID, err = azure.ParseLoadBalancerID(*i.ID)
			if err != nil {
				return nil, fmt.Errorf("failed to parse loadbalancer ID %s", *i.ID)
			}
		}
	}

	osProfile := profile.OSProfile
	if osProfile.LinuxConfiguration == nil {
		return nil, fmt.Errorf("found VMSS without Linux config")
	}
	if osProfile.LinuxConfiguration.SSH == nil {
		return nil, fmt.Errorf("found VMSS without SSH config")
	}
	if osProfile.LinuxConfiguration.SSH.PublicKeys == nil {
		return nil, fmt.Errorf("found VMSS without SSH public keys")
	}
	sshKeys := osProfile.LinuxConfiguration.SSH.PublicKeys
	if len(sshKeys) != 1 {
		return nil, fmt.Errorf("expecting exactly 1 SSH key for %q, found %d: %+v", *s.Name, len(sshKeys), sshKeys)
	}

	var userData []byte
	if profile.UserData != nil {
		userData, err = base64.StdEncoding.DecodeString(*profile.UserData)
		if err != nil {
			return nil, fmt.Errorf("failed to decode user data: %w", err)
		}

View on GitHub (pinned to 4c8573c808)