kubernetes/kops · error

found forwardingRule %q, but it has unknown loadBalancingSch

Error message

found forwardingRule %q, but it has unknown loadBalancingScheme=%q

What it means

Enumeration guard in GetApiIngressStatus: the forwarding rule's LoadBalancingScheme is none of the known internal/external values kOps handles, so it cannot classify the endpoint as internal or external. Indicates an API value kOps does not recognize — likely a new GCP scheme or modified rule.

Source

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

			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,
		})
	}

	return ingresses, nil
}

// FindInstanceTemplates finds all instance templates that are associated with the current cluster
// It matches them by looking for instance metadata with key='cluster-name' and value of our cluster name
func FindInstanceTemplates(c GCECloud, clusterName string) ([]*compute.InstanceTemplate, error) {
	findClusterName := strings.TrimSpace(clusterName)

	ts, err := c.Compute().InstanceTemplates().List(context.Background(), c.Project())
	if err != nil {

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Check the forwarding rule's loadBalancingScheme in the GCP console
  2. Report the unrecognized scheme to kOps if it is a legitimate GCP value
  3. Fix or recreate the rule with a standard scheme
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/gce/gce_cloud.go:365 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/0f805547ab874885. Report an issue: GitHub.