kubernetes/kops · error

error listing Backend Services: %v

Error message

error listing Backend Services: %v

What it means

Wrapped error from BackendService.find when the RegionBackendServices.Get call fails with something other than 404. Despite the message saying 'listing', it is a single-resource Get; typical causes are auth/permission errors, invalid project or region, or GCE API unavailability.

Source

Thrown at upup/pkg/fi/cloudup/gcetasks/backend_service.go:67

func (e *BackendService) Find(c *fi.CloudupContext) (*BackendService, error) {
	actual, err := e.find(c.T.Cloud.(gce.GCECloud))
	if actual != nil && err == nil {
		// Ignore system fields
		actual.Lifecycle = e.Lifecycle
		actual.ForAPIServer = e.ForAPIServer
	}
	return actual, err
}

func (e *BackendService) find(cloud gce.GCECloud) (*BackendService, error) {
	r, err := cloud.Compute().RegionBackendServices().Get(cloud.Project(), cloud.Region(), *e.Name)
	if err != nil {
		if gce.IsNotFound(err) {
			return nil, nil
		}

		return nil, fmt.Errorf("error listing Backend Services: %v", err)
	}

	actual := &BackendService{}
	actual.Name = &r.Name
	actual.Protocol = &r.Protocol
	actual.LoadBalancingScheme = &r.LoadBalancingScheme
	var hcs []*HealthCheck
	for _, hc := range r.HealthChecks {
		nameParts := strings.Split(hc, "/")
		hcs = append(hcs, &HealthCheck{Name: &nameParts[len(nameParts)-1]})
	}
	actual.HealthChecks = hcs
	var igms []*InstanceGroupManager
	for _, be := range r.Backends {
		if be.Group == "" {
			continue
		}
		nameParts := strings.Split(be.Group, "/")

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Check the wrapped %v for the Google API reason (403 permission, 400 bad request, connectivity)
  2. Verify the service account has compute.regionBackendServices.get on the target project/region
  3. Retry if the error indicates a transient GCE API failure
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/gcetasks/backend_service.go:67 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/405294f8fb94a159. Report an issue: GitHub.