kubernetes/kops · error

must specify a unique zone for instancegroup %q used by etcd

Error message

must specify a unique zone for instancegroup %q used by etcd %s/%s

What it means

Each etcd member's volume must live in exactly one zone, but FindZonesForInstanceGroup returned more than one zone for the instance group. This is a generic validation guard rejecting a multi-zone (spanning) IG for a single etcd member; the input at fault is the IG's subnet/zone configuration.

Source

Thrown at pkg/model/master_volumes.go:90

			igName := fi.ValueOf(m.InstanceGroup)
			if igName == "" {
				return fmt.Errorf("InstanceGroup not set on etcd %s/%s", m.Name, etcd.Name)
			}
			ig := b.FindInstanceGroup(igName)
			if ig == nil {
				return fmt.Errorf("InstanceGroup not found (for etcd %s/%s): %q", m.Name, etcd.Name, igName)
			}

			zones, err := model.FindZonesForInstanceGroup(b.Cluster, ig)
			if err != nil {
				return err
			}
			if len(zones) == 0 {
				return fmt.Errorf("must specify a zone for instancegroup %q used by etcd %s/%s", igName, m.Name, etcd.Name)
			}
			if len(zones) != 1 {
				return fmt.Errorf("must specify a unique zone for instancegroup %q used by etcd %s/%s", igName, m.Name, etcd.Name)
			}
			zone := zones[0]

			volumeSize := fi.ValueOf(m.VolumeSize)
			if volumeSize == 0 {
				volumeSize = DefaultEtcdVolumeSize
			}

			var allMembers []string
			for _, m := range etcd.Members {
				allMembers = append(allMembers, m.Name)
			}
			sort.Strings(allMembers)

			switch b.Cluster.GetCloudProvider() {
			case kops.CloudProviderAWS:
				err = b.addAWSVolume(c, name, volumeSize, zone, etcd, m, allMembers)
				if err != nil {

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Restrict the etcd instance group to exactly one zone by assigning it a single subnet
  2. Split etcd members across separate instance groups, one per zone, instead of one multi-zone IG
  3. Verify cluster subnets do not accidentally map multiple zones to the same IG
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at pkg/model/master_volumes.go:90 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/b38fc3e5075b438e. Report an issue: GitHub.