kubernetes/kops · error

error initializing Scaleway cloud: %w

Error message

error initializing Scaleway cloud: %w

What it means

Thrown in BuildCloud when scaleway.NewScwCloud fails for the zone/region and tags computed from the cluster spec. Initialization fails mainly when Scaleway credentials are absent from the environment (the SCW_* variables) or the computed zone is not usable for the API client.

Source

Thrown at upup/pkg/fi/cloudup/utils.go:181

			cloudTags := map[string]string{azure.TagClusterName: cluster.ObjectMeta.Name}
			for k, v := range cluster.Spec.CloudLabels {
				cloudTags[k] = v
			}

			subscriptionID := cluster.Spec.CloudProvider.Azure.SubscriptionID
			resourceGroupName := cluster.AzureResourceGroupName()
			azureCloud, err := azure.NewAzureCloud(subscriptionID, resourceGroupName, region, cloudTags)
			if err != nil {
				return nil, err
			}

			cloud = azureCloud
		}
	case kops.CloudProviderScaleway:
		{
			zone, err := scaleway.ParseZoneFromClusterSpec(cluster.Spec)
			if err != nil {
				return nil, fmt.Errorf("error initializing Scaleway cloud: %w", err)
			}
			region, err := scaleway.ParseRegionFromZone(zone)
			if err != nil {
				return nil, fmt.Errorf("error initializing Scaleway cloud: %w", err)
			}

			cloudTags := map[string]string{
				scaleway.TagClusterName: cluster.ObjectMeta.Name,
				"zone":                  string(zone),
				"region":                string(region),
			}
			for k, v := range cluster.Spec.CloudLabels {
				cloudTags[k] = v
			}

			scwCloud, err := scaleway.NewScwCloud(cloudTags)
			if err != nil {
				return nil, fmt.Errorf("error initializing Scaleway cloud: %w", err)

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Configure Scaleway credentials (SCW_ACCESS_KEY/SCW_SECRET_KEY or SCW_TOKEN) in the environment
  2. Verify the cluster's zone parses to a valid Scaleway zone (e.g. fr-par-1)
  3. Re-run the operation after credentials and zone are corrected
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/utils.go:181 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/bdc5488c659bc9c9. Report an issue: GitHub.