{"record":{"id":"a7b8b7441fe909ca","repo":"kubernetes/kops","slug":"unsupported-cloud-provider-s-a7b8b7","errorCode":null,"errorMessage":"unsupported cloud provider %s","messagePattern":"unsupported cloud provider (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/template_functions.go","lineNumber":927,"sourceCode":"\t\t\tconfig.Server.Provider.DigitalOcean = &do.DigitalOceanVerifierOptions{}\n\n\t\tcase kops.CloudProviderScaleway:\n\t\t\tconfig.Server.Provider.Scaleway = &scaleway.ScalewayVerifierOptions{}\n\n\t\tcase kops.CloudProviderAzure:\n\t\t\tconfig.Server.Provider.Azure = &azure.AzureVerifierOptions{\n\t\t\t\tClusterName: tf.ClusterName(),\n\t\t\t}\n\n\t\tcase kops.CloudProviderLinode:\n\t\t\tconfig.Server.Provider.Linode = &linode.LinodeVerifierOptions{}\n\n\t\tcase kops.CloudProviderMetal:\n\t\t\t// Use crypto public/private keys for Metal\n\t\t\tconfig.Server.PKI = &pkibootstrap.Options{}\n\n\t\tdefault:\n\t\t\treturn \"\", fmt.Errorf(\"unsupported cloud provider %s\", cluster.GetCloudProvider())\n\t\t}\n\t}\n\n\tif cluster.Spec.IsKopsControllerIPAM() {\n\t\tconfig.EnableCloudIPAM = true\n\t}\n\n\t// To avoid indentation problems, we marshal as json.  json is a subset of yaml\n\tb, err := json.Marshal(config)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to serialize kops-controller config: %v\", err)\n\t}\n\n\treturn string(b), nil\n}\n\n// KopsControllerArgv returns the args to kops-controller\nfunc (tf *TemplateFunctions) KopsControllerArgv() ([]string, error) {","sourceCodeStart":909,"sourceCodeEnd":945,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/template_functions.go#L909-L945","documentation":"KopsControllerConfig has a switch over cluster.GetCloudProvider() to populate cloud-specific server options. If the cluster's cloud provider value does not match any supported case (AWS, GCE, Metal, etc.), the default branch returns this error, meaning kops-controller config cannot be generated for that provider.","triggerScenarios":"Calling the KopsControllerConfig template function for a cluster whose spec.cloudProvider is an unsupported or unrecognized value (e.g. empty, misspelled like 'awss', or a provider without kops-controller support).","commonSituations":"Hand-edited cluster spec with typo in cloudProvider; using an alpha/new provider not yet wired into kops-controller config generation; upgrading kOps where a provider was renamed.","solutions":["Check spec.cloudProvider in the cluster spec for typos and set it to a supported value (aws, gce, hetzner, openstack, metal, etc.).","Upgrade kOps to a version that supports the provider you are using.","If using a custom/new provider, add a case for it in KopsControllerConfig or file an upstream issue."],"exampleFix":"// before (cluster.yaml)\ncloudProvider: AW\n// after\ncloudProvider: aws","handlingStrategy":"validation","validationCode":"// Go: check provider before calling the template function\nswitch strings.ToLower(cluster.Spec.CloudProvider.String()) {\ncase \"aws\", \"gce\", \"metal\", \"openstack\", \"hetzner\", \"digitalocean\":\n    // ok\ndefault:\n    return fmt.Errorf(\"cloudProvider %q unsupported by KopsControllerConfig\", cluster.GetCloudProvider())\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set spec.cloudProvider from kops's canonical enum values","Lint cluster specs against the kops CloudProvider enum","After kOps upgrades, confirm provider support before rendering configs"],"tags":["cloud-provider","config","template-function"],"backgroundTag":"unsupported-cloud-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"}