kubernetes/kops · error
found VMSS without IP config subnet
Error message
found VMSS without IP config subnet
What it means
Find reads the subnet from ipConfig.Properties.Subnet to determine which kops subnet the VMSS belongs to; this error fires when the Subnet reference block itself is nil (a separate check covers a nil Subnet.ID). Without it, kops cannot reconcile the scale set against the cluster network topology.
Source
Thrown at upup/pkg/fi/cloudup/azuretasks/vmscaleset.go:144
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)
}
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)View on GitHub (pinned to 4c8573c808)
Solutions
- Re-apply the cluster so kops recreates/updates the VMSS with the correct subnet reference.
- Fix the VMSS subnet reference in Azure to point at the kops-managed subnet.
- Set Subnet (with a valid ID) in test fixtures.
- Verify the referenced subnet still exists and wasn't deleted or renamed.
Example fix
// before
props := &compute.VirtualMachineScaleSetIPConfigurationProperties{}
// after
props := &compute.VirtualMachineScaleSetIPConfigurationProperties{Subnet: &compute.APIEntityReference{ID: &subnetID}} Defensive patterns
Strategy: validation
Validate before calling
if ip.Properties.Subnet == nil || ip.Properties.Subnet.ID == nil {
return fmt.Errorf("IP config has no subnet reference; re-apply cluster")
} Type guard
func hasSubnetRef(ip *compute.VirtualMachineScaleSetIPConfiguration) bool {
return ip != nil && ip.Properties != nil && ip.Properties.Subnet != nil && ip.Properties.Subnet.ID != nil
} Try / catch
found, err := task.Find(ctx, cloud)
if err != nil {
if strings.Contains(err.Error(), "without IP config subnet") {
return repairSubnetReference(err)
}
return err
} Prevention
- Never detach or rename the kops-managed subnet referenced by node VMSS.
- Verify subnet existence before apply when network changes were made.
- Include Subnet with a valid ID in test fixtures.
When it happens
Trigger: ipConfig.Properties.Subnet == nil in the returned VMSS — the IP config exists but carries no subnet reference, e.g. after someone detached the subnet or the fixture omits it.
Common situations: Manual VMSS edits removing the subnet; network refactors where the subnet was changed externally; incomplete test mocks.
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/aacda80fbf362b37.
Report an issue: GitHub.