kubernetes/kops · error

error listing zones: %v

Error message

error listing zones: %v

What it means

Wraps the compute Zones().List failure in GetZones. Fires when the GCE API call to enumerate zones errors (auth, quota, connectivity), blocking any zone-scoped logic such as instance template/disk operations.

Source

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

func (c *gceCloudImplementation) FindVPCInfo(id string) (*fi.VPCInfo, error) {
	klog.Warningf("FindVPCInfo not (yet) implemented on GCE")
	return nil, nil
}

func (c *gceCloudImplementation) Labels() map[string]string {
	// Defensive copy
	tags := make(map[string]string)
	maps.Copy(tags, c.labels)
	return tags
}

func GetZones(c GCECloud) ([]string, error) {
	var zones []string
	// TODO: Only zones in api.Cluster object, if we have one?
	gceZones, err := c.Compute().Zones().List(context.Background(), c.Project())
	if err != nil {
		return nil, fmt.Errorf("error listing zones: %v", err)
	}
	for _, gceZone := range gceZones {
		u, err := ParseGoogleCloudURL(gceZone.Region)
		if err != nil {
			return nil, err
		}
		if u.Name != c.Region() {
			continue
		}
		zones = append(zones, gceZone.Name)
	}
	if len(zones) == 0 {
		return nil, fmt.Errorf("unable to determine zones in region %q", c.Region())
	}

	klog.Infof("Scanning zones: %v", zones)
	return zones, nil
}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Verify credentials and compute.zones.list permission
  2. Check API quota and connectivity
  3. Retry after transient failures
Defensive patterns

Strategy: try-catch

When it happens

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