{"record":{"id":"2bda6a05798e44eb","repo":"kubernetes/kops","slug":"unsupported-architecture-for-instance-type-q-v","errorCode":null,"errorMessage":"unsupported architecture for instance type %q: %v","messagePattern":"unsupported architecture for instance type %q: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/new_cluster.go","lineNumber":1767,"sourceCode":"\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"error finding instance info for instance type %q: %w\", machineType, err)\n\t\t}\n\t\tif info.ProcessorInfo == nil || len(info.ProcessorInfo.SupportedArchitectures) == 0 {\n\t\t\treturn \"\", fmt.Errorf(\"unable to determine architecture info for instance type %q\", machineType)\n\t\t}\n\t\tvar unsupported []ec2types.ArchitectureType\n\t\tfor _, arch := range info.ProcessorInfo.SupportedArchitectures {\n\t\t\t// Return the first found supported architecture, in order of popularity\n\t\t\tswitch arch {\n\t\t\tcase ec2types.ArchitectureTypeX8664:\n\t\t\t\treturn architectures.ArchitectureAmd64, nil\n\t\t\tcase ec2types.ArchitectureTypeArm64:\n\t\t\t\treturn architectures.ArchitectureArm64, nil\n\t\t\tdefault:\n\t\t\t\tunsupported = append(unsupported, arch)\n\t\t\t}\n\t\t}\n\t\treturn \"\", fmt.Errorf(\"unsupported architecture for instance type %q: %v\", machineType, unsupported)\n\tdefault:\n\t\t// No other clouds are known to support any other architectures at this time\n\t\treturn architectures.ArchitectureAmd64, nil\n\t}\n}\n\n// discoveryUniverseID returns the universe ID for the cluster's discovery service,\n// creating a new discovery CA if necessary.\nfunc discoveryUniverseID(ctx context.Context, keystore fi.Keystore) (string, error) {\n\tkeyset, err := keystore.FindKeyset(ctx, fi.DiscoveryCAID)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"error finding discovery CA: %w\", err)\n\t}\n\n\tif keyset == nil || keyset.Primary == nil || keyset.Primary.Certificate == nil {\n\t\tsubject := pkix.Name{\n\t\t\tCommonName: fi.DiscoveryCAID,\n\t\t}","sourceCodeStart":1749,"sourceCodeEnd":1785,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/new_cluster.go#L1749-L1785","documentation":"MachineArchitecture iterates the EC2 SupportedArchitectures list and only maps x86_64 and arm64; if none of the returned architectures are supported it collects them and returns this error listing the unsupported values.","triggerScenarios":"Selecting an instance type whose ProcessorInfo.SupportedArchitectures contains only architectures other than x8664/arm64, e.g. i386 or future arch types returned by the EC2 API.","commonSituations":"Legacy/obscure instance types; AWS introducing a new architecture not yet handled by the installed kops version.","solutions":["Pick an x86_64 or arm64 instance type (t3/m5 for amd64, m6g/c7g for arm64)","Upgrade kops so newly introduced EC2 architectures are recognized"],"exampleFix":"// before\n--instance-type=<i386-only-type>\n// after\n--instance-type=m6g.large","handlingStrategy":"validation","validationCode":"for _, arch := range processorInfo.SupportedArchitectures {\n    if arch != ec2types.ArchitectureTypeX8664 && arch != ec2types.ArchitectureTypeArm64 {\n        return fmt.Errorf(\"instance type arch %s unsupported by kops\", arch)\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use x86_64 or arm64 instance types only","Keep kops current when AWS adds architectures"],"tags":["aws","architecture","instance-type"],"backgroundTag":"unsupported-instance-architecture","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}