{"record":{"id":"addb0fd8ea6f4a6f","repo":"kubernetes/kops","slug":"unable-to-determine-default-image-for-cloud-provid","errorCode":null,"errorMessage":"unable to determine default image for cloud provider %q and architecture %q","messagePattern":"unable to determine default image for cloud provider %q and architecture %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/new_cluster.go","lineNumber":1733,"sourceCode":"\t\tif image != nil {\n\t\t\treturn image.Name, nil\n\t\t}\n\t}\n\n\tswitch cluster.GetCloudProvider() {\n\tcase api.CloudProviderDO:\n\t\treturn defaultDOImageNoble, nil\n\tcase api.CloudProviderHetzner:\n\t\treturn defaultHetznerImageNoble, nil\n\tcase api.CloudProviderScaleway:\n\t\treturn defaultScalewayImageNoble, nil\n\tcase api.CloudProviderLinode:\n\t\treturn defaultLinodeImageNoble, nil\n\tcase api.CloudProviderMetal:\n\t\treturn \"dummy-metal-image\", nil\n\t}\n\n\treturn \"\", fmt.Errorf(\"unable to determine default image for cloud provider %q and architecture %q\", cluster.GetCloudProvider(), architecture)\n}\n\nfunc MachineArchitecture(cloud fi.Cloud, machineType string) (architectures.Architecture, error) {\n\tif machineType == \"\" {\n\t\treturn architectures.ArchitectureAmd64, nil\n\t}\n\n\t// Some calls only have AWS initialised at this point and in other cases pass in nil as cloud.\n\tif cloud == nil {\n\t\treturn architectures.ArchitectureAmd64, nil\n\t}\n\n\tswitch cloud.ProviderID() {\n\tcase api.CloudProviderAWS:\n\t\tinfo, err := cloud.(awsup.AWSCloud).DescribeInstanceType(machineType)\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"error finding instance info for instance type %q: %w\", machineType, err)\n\t\t}","sourceCodeStart":1715,"sourceCodeEnd":1751,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/new_cluster.go#L1715-L1751","documentation":"defaultImage falls through all known cloud providers and architectures without finding a default image, so it returns this error. It means kops has no built-in default AMI/image mapping for the given cloud provider and CPU architecture combination.","triggerScenarios":"`kops create cluster` (or cluster creation path) reaching defaultImage with a cloud provider that has no case in the switch for the requested architecture, or a provider/architecture combination not covered (e.g. a newly added provider before image defaults exist).","commonSituations":"Using a newer/exotic cloud provider without an image default; requesting arm64 on a provider where only amd64 defaults are defined; custom builds where the provider switch was not extended.","solutions":["Specify --image explicitly so the default lookup is skipped","Use a supported architecture (amd64) for the provider","Upgrade kops — newer releases add default images for more providers/architectures"],"exampleFix":"// before\nkops create cluster --cloud linode --arch arm64 ...\n// after\nkops create cluster --cloud linode --image linode/debian12 ...","handlingStrategy":"validation","validationCode":"if image == \"\" {\n    // explicitly pass an image instead of relying on defaults\n    cmd = append(cmd, \"--image\", requestedImage)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass --image for non-mainstream providers/architectures","Pin an image per provider/arch in your tooling","Keep kops updated for new provider defaults"],"tags":["cloud-provider","image","architecture"],"backgroundTag":"no-default-image-for-provider","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"}