kubernetes/kops · error
spotinst: unsupported cloud provider: %s
Error message
spotinst: unsupported cloud provider: %s
What it means
NewCloud only implements the Spotinst Cloud interface for AWS; any other CloudProviderID falls into the default branch and is rejected before any Spotinst API call is made.
Source
Thrown at pkg/resources/spotinst/spotinst.go:52
// NewCloud returns a Cloud interface for the specified cloud provider.
func NewCloud(cloudProviderID kops.CloudProviderID) (Cloud, error) {
var (
cloud Cloud
sess = session.New(NewConfig())
eg = elastigroup.New(sess)
oc = ocean.New(sess)
)
switch cloudProviderID {
case kops.CloudProviderAWS:
cloud = &awsCloud{
eg: &awsElastigroupService{eg.CloudProviderAWS()},
oc: &awsOceanService{oc.CloudProviderAWS()},
ls: &awsOceanLaunchSpecService{oc.CloudProviderAWS()},
}
default:
return nil, fmt.Errorf("spotinst: unsupported cloud provider: %s", cloudProviderID)
}
return cloud, nil
}
// NewConfig returns a new configuration object.
func NewConfig() *spotinst.Config {
config := spotinst.DefaultConfig()
config.WithCredentials(NewCredentials())
config.WithLogger(NewStdLogger())
config.WithUserAgent("kubernetes-kops/" + kopsv.Version)
return config
}
// NewCredentials returns a new chain-credentials object.
func NewCredentials() *credentials.Credentials {View on GitHub (pinned to 4c8573c808)
Solutions
- Spotinst integration only supports AWS clusters; set spec.cloudProvider to aws
- Remove Spotinst settings (elastigroup/ocean) when using other providers
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/resources/spotinst/spotinst.go:52 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/4b5b55c3c646705b.
Report an issue: GitHub.