kubernetes/kops · error
found VMSS without network profile
Error message
found VMSS without network profile
What it means
Find reads the VMSS network interface configuration to discover the subnet and backend pools; this requires VirtualMachineProfile.NetworkProfile to be non-nil. The error means Azure returned a scale set whose VM profile has no network profile section.
Source
Thrown at upup/pkg/fi/cloudup/azuretasks/vmscaleset.go:119
if found == nil {
return nil, nil
}
if found.ID == nil {
return nil, fmt.Errorf("found VMSS without ID")
}
if found.Properties == nil {
return nil, fmt.Errorf("found VMSS without properties")
}
if fi.ValueOf(found.Properties.ProvisioningState) == "Failed" {
klog.Warningf("found VMSS %q in failed provisioning state", *s.Name)
return nil, nil
}
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)View on GitHub (pinned to 4c8573c808)
Solutions
- Re-apply the cluster (kops apply) so kops recreates the VMSS with a proper network profile.
- Delete the malformed VMSS and let kops recreate it.
- Add NetworkProfile with NetworkInterfaceConfigurations to test fixtures.
- Check that external automation is not overwriting the VMSS network settings.
Example fix
// before
profile := &compute.VirtualMachineScaleSetVMProfile{}
// after
profile := &compute.VirtualMachineScaleSetVMProfile{NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfile{NetworkInterfaceConfigurations: ...}} Defensive patterns
Strategy: validation
Validate before calling
p := vmss.Properties.VirtualMachineProfile
if p.NetworkProfile == nil || len(p.NetworkProfile.NetworkInterfaceConfigurations) == 0 {
return fmt.Errorf("VMSS has no network profile/NICs; re-apply cluster")
} Type guard
func hasNetworkProfile(v *compute.VirtualMachineScaleSet) bool {
return v != nil && v.Properties != nil && v.Properties.VirtualMachineProfile != nil &&
v.Properties.VirtualMachineProfile.NetworkProfile != nil
} Try / catch
found, err := task.Find(ctx, cloud)
if err != nil {
if strings.Contains(err.Error(), "without network profile") {
return applyClusterSpec()
}
return err
} Prevention
- Do not add or remove NIC configurations outside the kops spec.
- Keep NetworkProfile populated in mocks.
- Audit the resource group for drift before applying.
When it happens
Trigger: VirtualMachineProfile.NetworkProfile == nil in the returned VMSS — created without networkInterfaceConfigurations, or the fixture omits NetworkProfile.
Common situations: VMSS hand-edited or created by other tooling without NIC config; partially applied update removing network profile; 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/888015f11deb3897.
Report an issue: GitHub.