{"record":{"id":"0898b5b59c61cf94","repo":"kubernetes/kops","slug":"unable-to-determine-machine-architecture-for-insta","errorCode":null,"errorMessage":"unable to determine machine architecture for InstanceGroup %q: %v","messagePattern":"unable to determine machine architecture for InstanceGroup %q: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/populate_instancegroup_spec.go","lineNumber":152,"sourceCode":"\t\t\tig.Spec.MachineType, err = defaultMachineType(cloud, cluster, ig)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"error assigning default machine type for nodes: %v\", err)\n\t\t\t}\n\t\t}\n\t\tif ig.Spec.Manager != kops.InstanceManagerKarpenter {\n\t\t\tif ig.Spec.MinSize == nil {\n\t\t\t\tig.Spec.MinSize = new(int32(2))\n\t\t\t}\n\t\t\tif ig.Spec.MaxSize == nil {\n\t\t\t\tig.Spec.MaxSize = new(int32(2))\n\t\t\t}\n\t\t}\n\t}\n\n\tif ig.Spec.Image == \"\" {\n\t\tarchitecture, err := MachineArchitecture(cloud, ig.Spec.MachineType)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"unable to determine machine architecture for InstanceGroup %q: %v\", ig.ObjectMeta.Name, err)\n\t\t}\n\t\tig.Spec.Image, err = defaultImage(cluster, channel, architecture)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"unable to determine default image for instance group %q: %v\", ig.ObjectMeta.Name, err)\n\t\t}\n\t}\n\n\tif ig.Spec.Tenancy != \"\" && ig.Spec.Tenancy != \"default\" {\n\t\tswitch cluster.GetCloudProvider() {\n\t\tcase kops.CloudProviderAWS:\n\t\t\tif _, ok := awsDedicatedInstanceExceptions[ig.Spec.MachineType]; ok {\n\t\t\t\treturn nil, fmt.Errorf(\"invalid dedicated instance type: %s\", ig.Spec.MachineType)\n\t\t\t}\n\t\tdefault:\n\t\t\tklog.Warning(\"Trying to set tenancy on non-AWS environment\")\n\t\t}\n\t}\n","sourceCodeStart":134,"sourceCodeEnd":170,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/populate_instancegroup_spec.go#L134-L170","documentation":"When ig.Spec.Image is empty, kOps must pick a default image matching the machine's CPU architecture. It calls MachineArchitecture(cloud, ig.Spec.MachineType); if that lookup fails (unsupported machine type string or cloud API error), this error is returned.","triggerScenarios":"Creating/updating an InstanceGroup with no spec.image set and a machine type whose architecture cannot be resolved — e.g. unknown/typo'd instance type, or cloud (GCE/Azure/etc.) whose MachineArchitecture implementation cannot parse or query the type.","commonSituations":"Typo in machineType; machine type not valid for the cloud provider; custom machine types the architecture mapper doesn't recognize; older kOps versions lacking support for new instance families (e.g. ARM Graviton types).","solutions":["Set spec.image explicitly so architecture inference is skipped","Correct the spec.machineType value (verify it exists for your cloud/region)","Upgrade kOps to gain support for newer instance families/architectures","Inspect the wrapped error for the underlying cloud API failure (credentials, region)"],"exampleFix":"// before\nspec:\n  machineType: t3.medium\n// after\nspec:\n  machineType: t3.medium\n  image: ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*","handlingStrategy":"validation","validationCode":"// Validate machine type + image pair before populating\nif ig.Spec.Image == \"\" {\n    // only omit image when machineType is a known, supported family\n    known := []string{\"t3.\", \"m5.\", \"c5.\", \"n1-\", \"Standard_D\"}\n    ok := false\n    for _, p := range known {\n        if strings.HasPrefix(ig.Spec.MachineType, p) { ok = true; break }\n    }\n    if !ok { return fmt.Errorf(\"set spec.image explicitly for machineType %q\", ig.Spec.MachineType) }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin spec.image so architecture inference never runs","Use `kops toolbox instance-selector` to get valid machineType/image combos","Keep kOps current for new instance families"],"tags":["kops","instancegroup","architecture","image"],"backgroundTag":"machine-architecture-unknown","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}