kubernetes/kops · error

no sources specified

Error message

no sources specified

What it means

The load_image nodeup task (ctr images pull/import for containerd) requires at least one entry in Sources; rendering it with an empty list is a programming/config error, so RenderLocal fails fast with this message before touching containerd.

Source

Thrown at upup/pkg/fi/nodeup/nodetasks/load_image.go:109

func (e *LoadImageTask) Run(c *fi.NodeupContext) error {
	return fi.NodeupDefaultDeltaRunMethod(e, c)
}

func (_ *LoadImageTask) CheckChanges(a, e, changes *LoadImageTask) error {
	return nil
}

func (_ *LoadImageTask) RenderLocal(t *local.LocalTarget, a, e, changes *LoadImageTask) error {
	// Not adding ctx to signature as RenderLocal seems to be part of a common interface
	ctx := context.TODO()
	hash, err := hashing.FromString(e.Hash)
	if err != nil {
		return err
	}

	urls := e.Sources
	if len(urls) == 0 {
		return fmt.Errorf("no sources specified")
	}

	if !isContainerdReady() {
		return fi.NewTryAgainLaterError("waiting for containerd to be ready")
	}

	for _, url := range urls {
		err = importContainerImage(ctx, url, hash, t.CacheDir)
		if err == nil {
			return nil
		}
		klog.Warningf("error importing image from url %q: %v", url, err)
		if errors.Is(err, errCtrImport) {
			return err
		}
	}

	// All sources failed at download. Throttle to avoid runaway bandwidth costs.

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Ensure at least one source URL is set on the LoadImage task for the node's arch
  2. Check the code/spec path that populates Sources (CNI asset, addon assets) for empty results
  3. Verify the cluster spec's asset URLs are non-empty for your kubernetes version
  4. If building LoadImage conditionally, skip creating the task entirely when no sources exist

Example fix

// before
e.Sources = []string{} // task created anyway
// after
if len(sources) == 0 { return nil } // don't create LoadImage task
e.Sources = sources
Defensive patterns

Strategy: validation

Validate before calling

if len(e.Sources) == 0 {
  return fmt.Errorf("LoadImage %s has no sources; check asset configuration", e.Name)
}

Try / catch

if err := t.RenderLocal(ctx, a, b); err != nil {
  if err.Error() == "no sources specified" {
    return fmt.Errorf("image sources not configured for this arch/channel: %w", err)
  }
  return err
}

Prevention

When it happens

Trigger: A LoadImage task is created with no Sources entries — e.g. the image source list is built conditionally and all conditions were false, or the task was constructed manually without Sources.

Common situations: A kOps version/feature flag where the CNI or addon image URL was not populated for the channel/arch; custom nodeup tasks building LoadImage with an empty slice; misconfigured image mirror list.

Related errors


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/8ed5c9157459353f. Report an issue: GitHub.