kubernetes/kops · error
error listing TargetPools: %v
Error message
error listing TargetPools: %v
What it means
listTargetPools wraps the Compute TargetPools.List failure (project+region scoped) during GCE cluster resource discovery. It fires on API errors — credentials, disabled Compute API, region mismatch — and aborts enumeration of the cluster's load-balancer target pools.
Source
Thrown at pkg/resources/gce/gce.go:386
klog.Infof("Disk not found, assuming deleted: %q", t.SelfLink)
return nil
}
return fmt.Errorf("error deleting Disk %s: %v", t.SelfLink, err)
}
return c.WaitForOp(op)
}
func (d *clusterDiscoveryGCE) listTargetPools() ([]*resources.Resource, error) {
c := d.gceCloud
var resourceTrackers []*resources.Resource
ctx := context.Background()
tps, err := c.Compute().TargetPools().List(ctx, c.Project(), c.Region())
if err != nil {
return nil, fmt.Errorf("error listing TargetPools: %v", err)
}
for _, tp := range tps {
if !d.matchesClusterName(tp.Name) {
continue
}
resourceTracker := &resources.Resource{
Name: tp.Name,
ID: tp.Name,
Type: typeTargetPool,
Deleter: deleteTargetPool,
Obj: tp,
}
klog.V(4).Infof("Found resource: %s", tp.SelfLink)
resourceTrackers = append(resourceTrackers, resourceTracker)
View on GitHub (pinned to 4c8573c808)
Solutions
- Check GCP credentials and compute.targetPools.list permission
- Retry after transient API errors
- Verify the region in the cluster spec is correct
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at pkg/resources/gce/gce.go:386 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/973d8ff4effedc22.
Report an issue: GitHub.