{"record":{"id":"b4ffca2aa05f553b","repo":"kubernetes/kops","slug":"spotinst-unsupported-instance-group-type-s","errorCode":null,"errorMessage":"spotinst: unsupported instance group type: %s","messagePattern":"spotinst: unsupported instance group type: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/resources/spotinst/spotinst.go","lineNumber":97,"sourceCode":"\treturn log.LoggerFunc(func(format string, args ...interface{}) {\n\t\tklog.V(2).Infof(format, args...)\n\t})\n}\n\n// NewInstanceGroup returns an InstanceGroup wrapper for the specified cloud provider.\nfunc NewInstanceGroup(cloudProviderID kops.CloudProviderID,\n\tinstanceGroupType InstanceGroupType, obj interface{}) (InstanceGroup, error,\n) {\n\tswitch cloudProviderID {\n\tcase kops.CloudProviderAWS:\n\t\t{\n\t\t\tswitch instanceGroupType {\n\t\t\tcase InstanceGroupElastigroup:\n\t\t\t\treturn &awsElastigroupInstanceGroup{obj.(*awseg.Group)}, nil\n\t\t\tcase InstanceGroupOcean:\n\t\t\t\treturn &awsOceanInstanceGroup{obj.(*awsoc.Cluster)}, nil\n\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"spotinst: unsupported instance group type: %s\", instanceGroupType)\n\t\t\t}\n\t\t}\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"spotinst: unsupported cloud provider: %s\", cloudProviderID)\n\t}\n}\n\n// NewElastigroup returns an Elastigroup wrapper for the specified cloud provider.\nfunc NewElastigroup(cloudProviderID kops.CloudProviderID,\n\tobj interface{}) (InstanceGroup, error,\n) {\n\treturn NewInstanceGroup(\n\t\tcloudProviderID,\n\t\tInstanceGroupElastigroup,\n\t\tobj)\n}\n\n// NewOcean returns an Ocean wrapper for the specified cloud provider.","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/resources/spotinst/spotinst.go#L79-L115","documentation":"NewInstanceGroup wraps a Spotinst API object for a provider/type pair; only AWS with InstanceGroupElastigroup or InstanceGroupOcean is implemented, so any other combination is rejected with this error.","triggerScenarios":"Thrown at pkg/resources/spotinst/spotinst.go:97 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an AWS cluster with Spotinst Elastigroup or Ocean instance group types","Remove Spotinst-specific instance group settings for other cloud providers"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}