kubernetes/kops · error

unable to determine architecture info for instance type %q

Error message

unable to determine architecture info for instance type %q

What it means

After DescribeInstanceType succeeds, kops inspects info.ProcessorInfo.SupportedArchitectures; if the field is nil or empty it cannot map the instance type to an architecture and returns this error. It is a defensive guard against incomplete EC2 API responses.

Source

Thrown at upup/pkg/fi/cloudup/new_cluster.go:1753

func MachineArchitecture(cloud fi.Cloud, machineType string) (architectures.Architecture, error) {
	if machineType == "" {
		return architectures.ArchitectureAmd64, nil
	}

	// Some calls only have AWS initialised at this point and in other cases pass in nil as cloud.
	if cloud == nil {
		return architectures.ArchitectureAmd64, nil
	}

	switch cloud.ProviderID() {
	case api.CloudProviderAWS:
		info, err := cloud.(awsup.AWSCloud).DescribeInstanceType(machineType)
		if err != nil {
			return "", fmt.Errorf("error finding instance info for instance type %q: %w", machineType, err)
		}
		if info.ProcessorInfo == nil || len(info.ProcessorInfo.SupportedArchitectures) == 0 {
			return "", fmt.Errorf("unable to determine architecture info for instance type %q", machineType)
		}
		var unsupported []ec2types.ArchitectureType
		for _, arch := range info.ProcessorInfo.SupportedArchitectures {
			// Return the first found supported architecture, in order of popularity
			switch arch {
			case ec2types.ArchitectureTypeX8664:
				return architectures.ArchitectureAmd64, nil
			case ec2types.ArchitectureTypeArm64:
				return architectures.ArchitectureArm64, nil
			default:
				unsupported = append(unsupported, arch)
			}
		}
		return "", fmt.Errorf("unsupported architecture for instance type %q: %v", machineType, unsupported)
	default:
		// No other clouds are known to support any other architectures at this time
		return architectures.ArchitectureAmd64, nil
	}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Choose a mainstream instance type (e.g. t3, m5, c6g families)
  2. Upgrade kops/AWS SDK to pick up fixes for newer instance families
  3. Specify a node image and architecture explicitly if supported by the code path

Example fix

// before
--instance-type=some-exotic-new-type
// after
--instance-type=m6i.large
Defensive patterns

Strategy: fallback

Validate before calling

// check ProcessorInfo yourself
out, _ := ec2Client.DescribeInstanceTypes(...)
if len(out.InstanceTypes[0].ProcessorInfo.SupportedArchitectures) == 0 {
    // choose another instance type
}

Prevention

When it happens

Trigger: An instance type whose EC2 DescribeInstanceType response has no ProcessorInfo (e.g. unusual/new/specialized families, or an API surface change where the SDK returns an empty ProcessorInfo).

Common situations: Very new instance families before ProcessorInfo is populated; AWS SDK schema changes; some metal or specialized instance types.

Related errors


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