kubernetes/kops · error

unsupported cloud provider %s

Error message

unsupported cloud provider %s

What it means

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.

Source

Thrown at upup/pkg/fi/cloudup/template_functions.go:927

			config.Server.Provider.DigitalOcean = &do.DigitalOceanVerifierOptions{}

		case kops.CloudProviderScaleway:
			config.Server.Provider.Scaleway = &scaleway.ScalewayVerifierOptions{}

		case kops.CloudProviderAzure:
			config.Server.Provider.Azure = &azure.AzureVerifierOptions{
				ClusterName: tf.ClusterName(),
			}

		case kops.CloudProviderLinode:
			config.Server.Provider.Linode = &linode.LinodeVerifierOptions{}

		case kops.CloudProviderMetal:
			// Use crypto public/private keys for Metal
			config.Server.PKI = &pkibootstrap.Options{}

		default:
			return "", fmt.Errorf("unsupported cloud provider %s", cluster.GetCloudProvider())
		}
	}

	if cluster.Spec.IsKopsControllerIPAM() {
		config.EnableCloudIPAM = true
	}

	// To avoid indentation problems, we marshal as json.  json is a subset of yaml
	b, err := json.Marshal(config)
	if err != nil {
		return "", fmt.Errorf("failed to serialize kops-controller config: %v", err)
	}

	return string(b), nil
}

// KopsControllerArgv returns the args to kops-controller
func (tf *TemplateFunctions) KopsControllerArgv() ([]string, error) {

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Check spec.cloudProvider in the cluster spec for typos and set it to a supported value (aws, gce, hetzner, openstack, metal, etc.).
  2. Upgrade kOps to a version that supports the provider you are using.
  3. If using a custom/new provider, add a case for it in KopsControllerConfig or file an upstream issue.

Example fix

// before (cluster.yaml)
cloudProvider: AW
// after
cloudProvider: aws
Defensive patterns

Strategy: validation

Validate before calling

// Go: check provider before calling the template function
switch strings.ToLower(cluster.Spec.CloudProvider.String()) {
case "aws", "gce", "metal", "openstack", "hetzner", "digitalocean":
    // ok
default:
    return fmt.Errorf("cloudProvider %q unsupported by KopsControllerConfig", cluster.GetCloudProvider())
}

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Related errors


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/a7b8b7441fe909ca. Report an issue: GitHub.