{"record":{"id":"c21d3f6f4cfb2d06","repo":"kubernetes/kops","slug":"unable-to-determine-default-image-for-instance-gro","errorCode":null,"errorMessage":"unable to determine default image for instance group %q: %v","messagePattern":"unable to determine default image for instance group %q: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/populate_instancegroup_spec.go","lineNumber":156,"sourceCode":"\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\n\tif ig.IsControlPlane() {\n\t\tif len(ig.Spec.Subnets) == 0 {\n\t\t\treturn nil, fmt.Errorf(\"control-plane InstanceGroup %s did not specify any Subnets\", ig.ObjectMeta.Name)\n\t\t}","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/populate_instancegroup_spec.go#L138-L174","documentation":"After resolving the architecture, kOps calls defaultImage(cluster, channel, architecture) to select the base image for the InstanceGroup. This error wraps a failure there — no suitable default image exists in the channel for that architecture/cloud.","triggerScenarios":"Creating a cluster/InstanceGroup with spec.image empty while the kOps channel has no default image entry for the resolved architecture, or the channel file is missing/outdated/unparseable.","commonSituations":"Using an old kOps binary whose bundled channel lacks current images (cloud provider retired old images); unusual architecture (arm64) with an old channel; offline/air-gapped environments where image sources are unreachable; malformed --channel URL.","solutions":["Set spec.image explicitly in the InstanceGroup","Update kOps (newer releases ship updated channels with fresh AMIs/images)","Verify the channel source is reachable and correct (`kops get cluster` shows the channel in use)","Check the wrapped error: if it mentions architecture, ensure the channel supports it or change machine architecture"],"exampleFix":"// before\nspec:\n  role: Node\n// after\nspec:\n  role: Node\n  image: 099720109477/ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-20240207.1","handlingStrategy":"validation","validationCode":"// Pre-check that an image is configured or channel supports the arch\nif ig.Spec.Image == \"\" && (cluster.Spec.Channel == nil || cluster.GetKubernetesVersion() == \"\") {\n    return errors.New(\"no image set and channel defaults unavailable; set spec.image\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set spec.image explicitly (or use a maintained channel)","Don't pin channels to stale URLs in air-gapped environments","Run `kops update cluster --dry-run` to surface image resolution early"],"tags":["kops","image","channel","defaulting"],"backgroundTag":"default-image-not-found","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"}