kubernetes/kops · error

found no packages in channel for name=%q

Error message

found no packages in channel for name=%q

What it means

GetPackageVersion searches the channel's package list for entries matching the requested name and whose version/kopsVersion constraints match. This error means after filtering, zero packages matched — the requested addon/package name does not exist in the channel (or all candidates were excluded by version-range mismatches).

Source

Thrown at pkg/apis/kops/channel.go:429

			}

			versionRange, err := semver.ParseRange(pkg.KopsVersion)
			if err != nil {
				klog.Warningf("cannot parse KopsVersion=%q", pkg.KopsVersion)
				continue
			}

			if !kopsVersion.IsInRange(versionRange) {
				klog.V(2).Infof("kOps version %q does not match range: %s", kopsVersion, pkg.KopsVersion)
				continue
			}
		}

		matches = append(matches, pkg)
	}

	if len(matches) == 0 {
		return nil, fmt.Errorf("found no packages in channel for name=%q", name)
	}

	if len(matches) != 1 {
		return nil, fmt.Errorf("found multiple packages in channel for name=%q", name)
	}
	v, err := util.ParseVersion(matches[0].Version)
	if err != nil {
		return nil, fmt.Errorf("error parsing version %q for package %q", matches[0].Version, name)
	}
	return v, nil
}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Verify the exact package/addon name against the channel file's package list (names are case-sensitive).
  2. Dump the channel (kops get or curl the channel URL) and confirm the package entry exists with a matching manifestSelector/name.
  3. Check that the channel is current for your kOps version — upgrade the channel or use the channel matching your kOps release.
  4. If using a custom kOps build, ensure its version is valid semver so kopsVersion range filters don't silently drop every package (see also 'parsing kops version' error).

Example fix

// before
GetPackageVersion(channel, "networking.calic0")
// after
GetPackageVersion(channel, "networking.calico")
Defensive patterns

Strategy: fallback

Validate before calling

found := false
for _, pkg := range channel.Spec.Packages {
    if pkg.Name == name { found = true; break }
}
if !found {
    return fmt.Errorf("channel %s has no package named %s", channelName, name)
}

Try / catch

v, err := GetPackageVersion(channel, name)
if err != nil && strings.Contains(err.Error(), "found no packages") {
    // fall back to a default/bundled manifest or skip the addon
    klog.Warningf("package %q absent from channel; skipping", name)
    return nil, nil
}

Prevention

When it happens

Trigger: CreateAddons -> GetPackageVersion(name) where no channel package has a matching manifest/name, or every candidate was skipped because its kopsVersion range failed to parse (warning + continue) or its version constraints excluded the current kOps/Kubernetes version.

Common situations: Typo in addon name when calling GetPackageVersion/CreateAddons; custom channel missing the addon manifest; channel from an older kOps release lacking newly added packages; all packages filtered out because the channel's kopsVersion ranges don't cover a custom-built kOps version.

Related errors


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