{"record":{"id":"6585328e539ffda8","repo":"kubernetes/kops","slug":"expecting-exactly-1-network-interface-ip-config-fo","errorCode":null,"errorMessage":"expecting exactly 1 network interface IP config for %q, found %d: %+v","messagePattern":"expecting exactly 1 network interface IP config for %q, found (.+?): %\\+v","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/azuretasks/vmscaleset.go","lineNumber":137,"sourceCode":"\t\treturn nil, fmt.Errorf(\"found VMSS without network profile\")\n\t}\n\tif found.Properties.VirtualMachineProfile.OSProfile == nil {\n\t\treturn nil, fmt.Errorf(\"found VMSS without OS profile\")\n\t}\n\n\tprofile := found.Properties.VirtualMachineProfile\n\n\tnwConfigs := profile.NetworkProfile.NetworkInterfaceConfigurations\n\tif len(nwConfigs) != 1 {\n\t\treturn nil, fmt.Errorf(\"expecting exactly 1 network interface config for %q, found %d: %+v\", *s.Name, len(nwConfigs), nwConfigs)\n\t}\n\tnwConfig := nwConfigs[0]\n\tif nwConfig.Properties == nil {\n\t\treturn nil, fmt.Errorf(\"found VMSS without network interface config properties\")\n\t}\n\tipConfigs := nwConfig.Properties.IPConfigurations\n\tif len(ipConfigs) != 1 {\n\t\treturn nil, fmt.Errorf(\"expecting exactly 1 network interface IP config for %q, found %d: %+v\", *s.Name, len(ipConfigs), ipConfigs)\n\t}\n\tipConfig := ipConfigs[0]\n\tif ipConfig.Properties == nil {\n\t\treturn nil, fmt.Errorf(\"found VMSS without IP config properties\")\n\t}\n\tif ipConfig.Properties.Subnet == nil {\n\t\treturn nil, fmt.Errorf(\"found VMSS without IP config subnet\")\n\t}\n\tif ipConfig.Properties.Subnet.ID == nil {\n\t\treturn nil, fmt.Errorf(\"found VMSS without IP config subnet ID\")\n\t}\n\tsubnetID, err := azure.ParseSubnetID(*ipConfig.Properties.Subnet.ID)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to parse subnet ID %s\", *ipConfig.Properties.Subnet.ID)\n\t}\n\n\tvar loadBalancerID *azure.LoadBalancerID\n\tif ipConfig.Properties.LoadBalancerBackendAddressPools != nil {","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/azuretasks/vmscaleset.go#L119-L155","documentation":"Find expects exactly one IP configuration on the single NIC of a kops-managed VMSS, since node networking (subnet, load-balancer pools) is derived from it. Any other count aborts Find; the message names the scale set and includes the actual IP configs.","triggerScenarios":"nwConfig.Properties.IPConfigurations has length != 1 — extra IP configurations added (e.g. multiple private IPs / secondary LB pools) or none present.","commonSituations":"Manual addition of secondary IPs for containers/ingress; external tooling attaching extra IP configs; empty mocks.","solutions":["Inspect the VMSS NIC IP configurations and reduce to exactly one (az vmss show).","Delete the modified VMSS and re-apply with kops to restore the expected single IP config.","Fix fixtures so IPConfigurations contains exactly one entry.","Route extra-IP requirements through kops cluster spec instead of editing the VMSS directly."],"exampleFix":"// before (fixture)\nipConfigs := []*compute.VirtualMachineScaleSetIPConfiguration{ipA, ipB}\n// after\nipConfigs := []*compute.VirtualMachineScaleSetIPConfiguration{ipA}","handlingStrategy":"validation","validationCode":"ips := nic.Properties.IPConfigurations\nif ips == nil || len(ips) != 1 {\n    return fmt.Errorf(\"VMSS NIC must have exactly 1 IP config, found %d\", len(ips))\n}","typeGuard":"func hasSingleIPConfig(nic *compute.VirtualMachineScaleSetNetworkConfiguration) bool {\n    return nic != nil && nic.Properties != nil && len(nic.Properties.IPConfigurations) == 1\n}","tryCatchPattern":"found, err := task.Find(ctx, cloud)\nif err != nil {\n    if strings.Contains(err.Error(), \"exactly 1 network interface IP config\") {\n        return restoreSingleIPConfig(err)\n    }\n    return err\n}","preventionTips":["Avoid manually adding secondary IP configurations to node VMSS NICs.","Request additional IPs through the kops cluster spec instead.","Fixtures must contain exactly one IPConfiguration."],"tags":["azure","vmss","ip-configuration"],"backgroundTag":"azure-vmss-invalid-profile","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}