kubernetes/kops · error

EtcdMember %s:%s did not specify a InstanceGroup

Error message

EtcdMember %s:%s did not specify a InstanceGroup

What it means

Each etcd member must reference an InstanceGroup so kops knows which machines run that etcd member. run() throws this when fi.ValueOf(m.InstanceGroup) is empty for a member in an EtcdClusters entry. Without the instance group binding, the etcd cluster cannot be mapped onto nodes and provisioning aborts.

Source

Thrown at upup/pkg/fi/cloudup/populate_cluster_spec.go:131

		//		return fmt.Errorf("Subnets contained a duplicate value: %v", subnet.Name)
		//	}
		//	clusterSubnets[subnet.Name] = subnet
		//}

		// Check etcd configuration
		{
			for i, etcd := range cluster.Spec.EtcdClusters {
				if etcd.Name == "" {
					return fmt.Errorf("EtcdClusters #%d did not specify a Name", i)
				}

				for i, m := range etcd.Members {
					if m.Name == "" {
						return fmt.Errorf("EtcdMember #%d of etcd-cluster %s did not specify a Name", i, etcd.Name)
					}

					if fi.ValueOf(m.InstanceGroup) == "" {
						return fmt.Errorf("EtcdMember %s:%s did not specify a InstanceGroup", etcd.Name, m.Name)
					}
				}

				etcdInstanceGroups := make(map[string]kopsapi.EtcdMemberSpec)
				etcdNames := make(map[string]kopsapi.EtcdMemberSpec)

				for _, m := range etcd.Members {
					if _, ok := etcdNames[m.Name]; ok {
						return fmt.Errorf("EtcdMembers found with same name %q in etcd-cluster %q", m.Name, etcd.Name)
					}

					instanceGroupName := fi.ValueOf(m.InstanceGroup)

					if _, ok := etcdInstanceGroups[instanceGroupName]; ok {
						klog.Warningf("EtcdMembers are in the same InstanceGroup %q in etcd-cluster %q (fault-tolerance may be reduced)", instanceGroupName, etcd.Name)
					}

					//if clusterSubnets[zone] == nil {

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Set `instanceGroup:` on every etcd member, referencing an existing control-plane instance group (e.g. `control-plane-ap-south-1a`).
  2. Run `kops get ig` to list instance groups and match each etcd member to one control-plane group.
  3. Ensure every etcd member maps to a distinct instance group for fault tolerance (duplicates only produce a warning, but an empty group is fatal).

Example fix

// before
member := kopsapi.EtcdMemberSpec{Name: "a"}
// after
member := kopsapi.EtcdMemberSpec{Name: "a", InstanceGroup: fi.PtrTo("control-plane-ap-south-1a")}
Defensive patterns

Strategy: validation

Validate before calling

for _, etcd := range cluster.Spec.EtcdClusters {
	for _, m := range etcd.Members {
		if fi.ValueOf(m.InstanceGroup) == "" {
			return fmt.Errorf("etcd member %q missing instanceGroup", m.Name)
		}
	}
}

Type guard

func hasInstanceGroup(m kopsapi.EtcdMemberSpec) bool { return fi.ValueOf(m.InstanceGroup) != "" }

Prevention

When it happens

Trigger: PopulateClusterSpec encounters an EtcdMemberSpec with a Name but with instanceGroup unset/empty — e.g. a cluster spec where members list names but omit the instanceGroup field.

Common situations: Hand-written cluster manifests missing `instanceGroup:` on etcd members; renaming or deleting control-plane instance groups and forgetting to update member references; programmatic spec generation that fills name but not instanceGroup.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


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