kubernetes/kops · error
failed to find instance type details on: %s, error: %s
Error message
failed to find instance type details on: %s, error: %s
What it means
buildEphemeralDevices resolves instance-type metadata (via awsup.GetMachineTypeInfo) to map ephemeral device names to block device mappings; when the machine type cannot be found in the instance-type metadata it returns this error. It means kOps has no topology data for the given ec2 InstanceType.
Source
Thrown at upup/pkg/fi/cloudup/awstasks/helper.go:34
package awstasks
import (
"errors"
"fmt"
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
"k8s.io/kops/upup/pkg/fi/cloudup/awsup"
)
// buildEphemeralDevices looks up the machine type and discovery any ephemeral device mappings
func buildEphemeralDevices(cloud awsup.AWSCloud, machineType ec2types.InstanceType) (map[string]*BlockDeviceMapping, error) {
if machineType == "" {
return nil, nil
}
mt, err := awsup.GetMachineTypeInfo(cloud, machineType)
if err != nil {
return nil, fmt.Errorf("failed to find instance type details on: %s, error: %s", machineType, err)
}
blockDeviceMappings := make(map[string]*BlockDeviceMapping)
for _, ed := range mt.EphemeralDevices() {
blockDeviceMappings[ed.DeviceName] = &BlockDeviceMapping{VirtualName: new(ed.VirtualName)}
}
return blockDeviceMappings, nil
}
// buildAdditionalDevices is responsible for creating additional volumes in this lc
func buildAdditionalDevices(volumes []*BlockDeviceMapping) (map[string]*BlockDeviceMapping, error) {
devices := make(map[string]*BlockDeviceMapping)
// @step: iterate the volumes and create devices from them
for _, x := range volumes {
if x.DeviceName == nil {View on GitHub (pinned to 4c8573c808)
Solutions
- Fix the instance type name in the cluster/instance-group spec (check spelling and generation, e.g. m5.large).
- Upgrade kOps to a release whose instance type metadata includes the new family.
- If the type genuinely has no instance-store volumes, avoid relying on ephemeral device mappings (use EBS-backed storage).
Example fix
// before machineType: m6a.larg // after machineType: m6a.large
Defensive patterns
Strategy: validation
Validate before calling
// Pre-check instance type against kops supported types kops get instancegroups --name <cluster> -o yaml | grep machineType # or validate locally before apply: machineType=$(yq '.spec.machineType' ig.yaml) aws ec2 describe-instance-types --instance-types "$machineType" >/dev/null || echo "unknown instance type"
Type guard
func validInstanceType(mt ec2types.InstanceType) bool {
return mt != "" && strings.Contains(string(mt), ".") && len(strings.Split(string(mt), ".")) == 2
} Prevention
- Copy instance type names from AWS docs, never by hand
- Upgrade kOps before adopting new EC2 instance families
- Use EBS-backed instance groups to avoid ephemeral device mapping requirements
When it happens
Trigger: GetMachineTypeInfo errors because the instance type string is unknown/unsupported in the bundled metadata (e.g. typo, new generation not yet in kOps' instance type data, or wrong region family).
Common situations: Typo in the machineType in the InstanceGroup spec; using a brand-new instance family on an older kOps release; custom fork with outdated aws-instance-types data.
Related errors
- DIGITALOCEAN_ACCESS_TOKEN is required
- timed out waiting for volume to detach
- DeviceName not set for volume
- unexpected number of network interfaces for instance %q: %v
- unexpected amount of ipv6 prefixes on interface %q: %v
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/36d815f9f719c27d.
Report an issue: GitHub.