{"record":{"id":"7ca2f51e877eed2f","repo":"kubernetes/kops","slug":"getting-api-ingress-status","errorCode":null,"errorMessage":"getting API ingress status","messagePattern":"getting API ingress status","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/azure/azure_cloud.go","lineNumber":358,"sourceCode":"\t\tnis, err := c.NetworkInterface().ListScaleSetsNetworkInterfaces(context.TODO(), rg, vmssName)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"getting control plane VMSS network interfaces for API ingress status: %w\", err)\n\t\t}\n\t\tfor _, ni := range nis {\n\t\t\tif ni.Properties == nil || ni.Properties.Primary == nil || !*ni.Properties.Primary {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfor _, i := range ni.Properties.IPConfigurations {\n\t\t\t\tif i.Properties == nil || i.Properties.PrivateIPAddress == nil {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tingresses = append(ingresses, fi.ApiIngressStatus{\n\t\t\t\t\tIP: *i.Properties.PrivateIPAddress,\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t\tif ingresses == nil {\n\t\t\treturn nil, fmt.Errorf(\"getting API ingress status\")\n\t\t}\n\t}\n\n\treturn ingresses, nil\n}\n\nfunc (c *azureCloudImplementation) SubscriptionID() string {\n\treturn c.subscriptionID\n}\n\nfunc (c *azureCloudImplementation) ResourceGroup() ResourceGroupsClient {\n\treturn c.resourceGroupsClient\n}\n\nfunc (c *azureCloudImplementation) VirtualNetwork() VirtualNetworksClient {\n\treturn c.vnetsClient\n}\n","sourceCodeStart":340,"sourceCodeEnd":376,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/azure/azure_cloud.go#L340-L376","documentation":"After listing NICs, kOps collects private IP addresses of primary IP configurations into ingresses. If the resulting list is empty (ingresses == nil), it returns this generic error. It means the control plane VMSS exists and its NICs were listed, but no primary private IP configuration yielded an address, so an API ingress status cannot be reported.","triggerScenarios":"GetApiIngressStatus finds the control plane VMSS and lists NICs, but no NIC has Properties.Primary == true, no NIC has IPConfigurations, or PrivateIPAddress is nil/unset on all configurations.","commonSituations":"NICs were deleted or detached from control plane VMSS instances; VMSS instances failed provisioning so IP configurations were never assigned; manual edits to the NIC/IP configuration in the Azure portal; a VMSS scale-in removed all instances momentarily during rolling updates.","solutions":["Check control plane instance NICs in Azure (az vmss nic list -g <rg> --vmss-name <vmssName>) and verify each has a primary IP configuration with a private IP.","Wait for in-flight rolling updates/scale operations to finish, then retry.","If instances are unhealthy, recreate them via `kops rolling-update cluster` or kOps update to restore expected networking.","Verify the load balancer backend pool and NIC wiring were not manually altered; restore via `kops update cluster --yes`.","Run kops validate cluster to get a fuller health picture of the control plane."],"exampleFix":"null","handlingStrategy":"validation","validationCode":"// Go: check primary NIC IP configurations exist before expecting ingress output\nnicPager := nicClient.NewListVirtualMachineScaleSetNetworkInterfacesPager(rg, vmssName, nil)\nhasPrimaryIP := false\nfor nicPager.More() {\n    page, _ := nicPager.NextPage(ctx)\n    for _, ni := range page.Value {\n        for _, ipc := range ni.Properties.IPConfigurations {\n            if ipc.Properties != nil && ipc.Properties.PrivateIPAddress != nil {\n                hasPrimaryIP = true\n            }\n        }\n    }\n}\nif !hasPrimaryIP { return fmt.Errorf(\"no private IPs on control plane VMSS %s\", vmssName) }","typeGuard":"func hasPrivateIP(ni *armnetwork.Interface) bool {\n    if ni == nil || ni.Properties == nil {\n        return false\n    }\n    for _, ipc := range ni.Properties.IPConfigurations {\n        if ipc.Properties != nil && ipc.Properties.PrivateIPAddress != nil {\n            return true\n        }\n    }\n    return false\n}","tryCatchPattern":"status, err := cloud.GetApiIngressStatus(cluster)\nif err != nil && err.Error() == \"getting API ingress status\" {\n    log.Printf(\"no primary private IPs found on control plane NICs; inspect VMSS instances and IP configs\")\n    return err\n}","preventionTips":["Keep control plane instances healthy; investigate failed provisioning states promptly.","Do not detach or modify NICs/IP configurations of control plane instances in the Azure portal.","Wait for rolling updates or scale operations to complete before querying ingress status.","Recreate broken instances with kops rolling-update rather than manual fixes.","Monitor VMSS instance health (az vmss get-instance-view) during cluster operations."],"tags":["azure","api-ingress","network-interfaces","empty-result"],"backgroundTag":"no-ingress-endpoints-found","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"}