kubernetes/kops · error

found VMSS without network interface config properties

Error message

found VMSS without network interface config properties

What it means

After selecting the single NIC configuration, Find requires its Properties block to be non-nil to read IP configurations. A NIC config without Properties cannot yield subnet or backend-pool information, so reconciliation aborts with this error.

Source

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

	if found.Properties.VirtualMachineProfile == nil {
		return nil, fmt.Errorf("found VMSS without VM profile")
	}
	if found.Properties.VirtualMachineProfile.NetworkProfile == nil {
		return nil, fmt.Errorf("found VMSS without network profile")
	}
	if found.Properties.VirtualMachineProfile.OSProfile == nil {
		return nil, fmt.Errorf("found VMSS without OS profile")
	}

	profile := found.Properties.VirtualMachineProfile

	nwConfigs := profile.NetworkProfile.NetworkInterfaceConfigurations
	if len(nwConfigs) != 1 {
		return nil, fmt.Errorf("expecting exactly 1 network interface config for %q, found %d: %+v", *s.Name, len(nwConfigs), nwConfigs)
	}
	nwConfig := nwConfigs[0]
	if nwConfig.Properties == nil {
		return nil, fmt.Errorf("found VMSS without network interface config properties")
	}
	ipConfigs := nwConfig.Properties.IPConfigurations
	if len(ipConfigs) != 1 {
		return nil, fmt.Errorf("expecting exactly 1 network interface IP config for %q, found %d: %+v", *s.Name, len(ipConfigs), ipConfigs)
	}
	ipConfig := ipConfigs[0]
	if ipConfig.Properties == nil {
		return nil, fmt.Errorf("found VMSS without IP config properties")
	}
	if ipConfig.Properties.Subnet == nil {
		return nil, fmt.Errorf("found VMSS without IP config subnet")
	}
	if ipConfig.Properties.Subnet.ID == nil {
		return nil, fmt.Errorf("found VMSS without IP config subnet ID")
	}
	subnetID, err := azure.ParseSubnetID(*ipConfig.Properties.Subnet.ID)
	if err != nil {
		return nil, fmt.Errorf("failed to parse subnet ID %s", *ipConfig.Properties.Subnet.ID)

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Re-run kops apply / re-fetch after the VMSS update completes.
  2. Populate Properties on the mocked NetworkInterfaceConfiguration in tests.
  3. Delete and recreate a persistently malformed VMSS via kops apply.

Example fix

// before
nic := &compute.VirtualMachineScaleSetNetworkConfiguration{Name: &name}
// after
nic := &compute.VirtualMachineScaleSetNetworkConfiguration{Name: &name, Properties: &compute.VirtualMachineScaleSetNetworkConfigurationProperties{}}
Defensive patterns

Strategy: validation

Validate before calling

nic := nics[0]
if nic.Properties == nil {
    return fmt.Errorf("NIC config %s has no properties; re-fetch or recreate VMSS", fi.ValueOf(nic.Name))
}

Type guard

func hasNICProperties(nic *compute.VirtualMachineScaleSetNetworkConfiguration) bool {
    return nic != nil && nic.Properties != nil
}

Try / catch

found, err := task.Find(ctx, cloud)
if err != nil {
    if strings.Contains(err.Error(), "without network interface config properties") {
        return refetchAfterUpdate(err)
    }
    return err
}

Prevention

When it happens

Trigger: nwConfigs[0].Properties == nil in the returned VMSS — a NIC config entry present but its properties not populated (partial API response or fixture).

Common situations: Incomplete Azure response during a concurrent update; test mocks constructing NetworkConfiguration without Properties; SDK type shape changes.

Related errors


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