kubernetes/kops · error
unable to determine default image for instance group %q: %v
Error message
unable to determine default image for instance group %q: %v
What it means
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.
Source
Thrown at upup/pkg/fi/cloudup/populate_instancegroup_spec.go:156
}
if ig.Spec.Manager != kops.InstanceManagerKarpenter {
if ig.Spec.MinSize == nil {
ig.Spec.MinSize = new(int32(2))
}
if ig.Spec.MaxSize == nil {
ig.Spec.MaxSize = new(int32(2))
}
}
}
if ig.Spec.Image == "" {
architecture, err := MachineArchitecture(cloud, ig.Spec.MachineType)
if err != nil {
return nil, fmt.Errorf("unable to determine machine architecture for InstanceGroup %q: %v", ig.ObjectMeta.Name, err)
}
ig.Spec.Image, err = defaultImage(cluster, channel, architecture)
if err != nil {
return nil, fmt.Errorf("unable to determine default image for instance group %q: %v", ig.ObjectMeta.Name, err)
}
}
if ig.Spec.Tenancy != "" && ig.Spec.Tenancy != "default" {
switch cluster.GetCloudProvider() {
case kops.CloudProviderAWS:
if _, ok := awsDedicatedInstanceExceptions[ig.Spec.MachineType]; ok {
return nil, fmt.Errorf("invalid dedicated instance type: %s", ig.Spec.MachineType)
}
default:
klog.Warning("Trying to set tenancy on non-AWS environment")
}
}
if ig.IsControlPlane() {
if len(ig.Spec.Subnets) == 0 {
return nil, fmt.Errorf("control-plane InstanceGroup %s did not specify any Subnets", ig.ObjectMeta.Name)
}View on GitHub (pinned to 4c8573c808)
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
Example fix
// before spec: role: Node // after spec: role: Node image: 099720109477/ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-20240207.1
Defensive patterns
Strategy: validation
Validate before calling
// Pre-check that an image is configured or channel supports the arch
if ig.Spec.Image == "" && (cluster.Spec.Channel == nil || cluster.GetKubernetesVersion() == "") {
return errors.New("no image set and channel defaults unavailable; set spec.image")
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- error loading channel %q: %v
- invalid base channel location: %q
- error reading channel %q: %v
- error parsing channel %q: %v
- error parsing channel %v
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/c21d3f6f4cfb2d06.
Report an issue: GitHub.