kubernetes/kops · error

failed to list images: %v

Error message

failed to list images: %v

What it means

getImage wraps the images.List AllPages failure when querying the Glance image service by name. It fires when the image list API call fails (auth, endpoint, network), preventing kOps from resolving the cluster image.

Source

Thrown at upup/pkg/fi/cloudup/openstack/image.go:35

package openstack

import (
	"context"
	"fmt"

	"github.com/gophercloud/gophercloud/v2/openstack/image/v2/images"
)

func (c *openstackCloud) GetImage(name string) (*images.Image, error) {
	return getImage(c, name)
}

func getImage(c OpenstackCloud, name string) (*images.Image, error) {
	opts := images.ListOpts{Name: name}
	pager := images.List(c.ImageClient(), opts)
	page, err := pager.AllPages(context.TODO())
	if err != nil {
		return nil, fmt.Errorf("failed to list images: %v", err)
	}

	i, err := images.ExtractImages(page)
	if err != nil {
		return nil, fmt.Errorf("failed to extract images: %v", err)
	}

	switch len(i) {
	case 1:
		return &i[0], nil
	case 0:
		return nil, fmt.Errorf("no image found with name %v", name)
	default:
		return nil, fmt.Errorf("multiple images found with name %v", name)
	}
}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Check Glance (Image) API credentials and endpoint configuration
  2. Verify the image service is reachable from the environment
  3. Fix the image name/query if the request is malformed
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/openstack/image.go:35 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/a0906c105e073585. Report an issue: GitHub.