kubernetes/kops · error

found forwardingRule

Error message

found forwardingRule %q, but it did not have an IPAddress

What it means

Malformed-API-object guard in GetApiIngressStatus: a forwarding rule matching the cluster's api- prefix and labels was found, but its IPAddress field is empty, so no ingress endpoint can be reported for the API LB.

Solutions

  1. Check the forwarding rule in the GCP console for a resolved IP
  2. Wait for the LB IP allocation and retry
  3. Recreate the forwarding rule if it is stuck without an address
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/gce/gce_cloud.go:355 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at upup/pkg/fi/cloudup/gce/gce_cloud.go:355

			forwardingRules = nil
		} else {
			return nil, fmt.Errorf("error listing forwardingRules: %v", err)
		}
	}

	clusterLabel := LabelForCluster(cluster.Name)

	for _, forwardingRule := range forwardingRules {
		if !strings.HasPrefix(forwardingRule.Name, "api-") {
			continue
		}

		if clusterLabel.Value != forwardingRule.Labels[clusterLabel.Key] {
			continue
		}

		if forwardingRule.IPAddress == "" {
			return nil, fmt.Errorf("found forwardingRule %q, but it did not have an IPAddress", forwardingRule.Name)
		}

		internalEndpoint := false
		switch forwardingRule.LoadBalancingScheme {
		case "INTERNAL", "INTERNAL_MANAGED", "INTERNAL_SELF_MANAGED":
			internalEndpoint = true
		case "EXTERNAL", "EXTERNAL_MANAGED":
			internalEndpoint = false
		default:
			return nil, fmt.Errorf("found forwardingRule %q, but it has unknown loadBalancingScheme=%q", forwardingRule.Name, forwardingRule.LoadBalancingScheme)
		}

		ingresses = append(ingresses, fi.ApiIngressStatus{
			InternalEndpoint: internalEndpoint,
			IP:               forwardingRule.IPAddress,
		})
	}

View on GitHub (pinned to 4c8573c808)