kubernetes/kops · error

error building instance task for %q: %w

Error message

error building instance task for %q: %w

What it means

Wrapped failure parsing the Scaleway zone for an instance group (scw.ParseZone over the IG's first subnet string) while constructing the instance task. The instance group named is the one whose spec.subnets[0] is not a valid Scaleway zone.

Source

Thrown at pkg/model/scalewaymodel/instances.go:50

const defaultNodeRootVolumeSizeGB = 50
const defaultControlPlaneRootVolumeSizeGB = 20

// InstanceModelBuilder configures instances for the cluster
type InstanceModelBuilder struct {
	*ScwModelContext

	BootstrapScriptBuilder *model.BootstrapScriptBuilder
	Lifecycle              fi.Lifecycle
}

var _ fi.CloudupModelBuilder = &InstanceModelBuilder{}

func (b *InstanceModelBuilder) Build(c *fi.CloudupModelBuilderContext) error {
	for _, ig := range b.InstanceGroups {
		name := ig.Name
		zone, err := scw.ParseZone(ig.Spec.Subnets[0])
		if err != nil {
			return fmt.Errorf("error building instance task for %q: %w", name, err)
		}

		userData, err := b.BootstrapScriptBuilder.ResourceNodeUp(c, ig)
		if err != nil {
			return fmt.Errorf("error building bootstrap script for %q: %w", name, err)
		}

		instanceTags := []string{
			scaleway.TagClusterName + "=" + b.Cluster.Name,
			scaleway.TagInstanceGroup + "=" + ig.Name,
		}
		for k, v := range b.CloudTags(b.ClusterName(), false) {
			instanceTags = append(instanceTags, fmt.Sprintf("%s=%s", k, v))
		}

		instance := scalewaytasks.Instance{
			Count:          int(fi.ValueOf(ig.Spec.MinSize)),
			Name:           new(name),

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Set spec.subnets[0] of the instance group to a valid Scaleway zone like fr-par-1
  2. Ensure every Scaleway instance group has at least one subnet entry
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at pkg/model/scalewaymodel/instances.go:50 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/e8c176d9103f1197. Report an issue: GitHub.