kubernetes/kops · error

unknown arch: %q

Error message

unknown arch: %q

What it means

findRuncVersionUrl maps the CPU architecture to a runc download URL; only amd64 and arm64 have mappings. Any other architecture value falls through to the default case and returns this error instead of guessing a URL.

Source

Thrown at pkg/nodemodel/wellknownassets/runc.go:91

}

func findRuncVersionUrl(arch architectures.Architecture, version string) (string, error) {
	sv, err := semver.ParseTolerant(version)
	if err != nil {
		return "", fmt.Errorf("unable to parse version string: %q", version)
	}
	if sv.LT(semver.MustParse("1.1.0")) {
		return "", fmt.Errorf("unsupported runc version: %q", version)
	}

	var u string
	switch arch {
	case architectures.ArchitectureAmd64:
		u = fmt.Sprintf(runcVersionUrlAmd64, version)
	case architectures.ArchitectureArm64:
		u = fmt.Sprintf(runcVersionUrlArm64, version)
	default:
		return "", fmt.Errorf("unknown arch: %q", arch)
	}

	if u == "" {
		return "", fmt.Errorf("unknown url for runc version: %s - %s", arch, version)
	}

	return u, nil
}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Use an amd64 or arm64 instance type / machine image for the node pool.
  2. Fix the architecture value passed in (must exactly match kops/architectures constants).
  3. Vendor/build runc yourself for the architecture and bypass the asset lookup.
Defensive patterns

Strategy: validation

Validate before calling

switch arch {
case architectures.ArchitectureAmd64, architectures.ArchitectureArm64:
    // ok
default:
    return fmt.Errorf("arch %q not supported for runc assets", arch)
}

Try / catch

u, err := FindRuncAsset(arch, version)
if err != nil && strings.Contains(err.Error(), "unknown arch") {
    u, err = FindRuncAsset(architectures.ArchitectureAmd64, version) // or fail fast
}

Prevention

When it happens

Trigger: Calling FindRuncAsset with arch other than architectures.ArchitectureAmd64 or ArchitectureArm64 (e.g. ArchitectureArmhf, ppc64le, or a corrupted/unset architecture string).

Common situations: Building images for niche/legacy machine types; a machine architecture field in the instance group or config that is misspelled or from an older kOps enum; porting to a non-x86/arm cloud instance family.

Related errors


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