kubernetes/kops · error
EtcdMember #%d of etcd-cluster %s did not specify a Name
Error message
EtcdMember #%d of etcd-cluster %s did not specify a Name
What it means
During cluster spec population, every etcd cluster member must have a non-empty Name so members can be uniquely identified and quorum can be assembled. This error is thrown in populateClusterSpec.run when a member of an EtcdClusters entry has an empty Name field after defaults are filled. It is a cluster spec validation error that aborts cluster creation/upgrading.
Source
Thrown at upup/pkg/fi/cloudup/populate_cluster_spec.go:127
// TODO: Check that instance groups referenced here exist
//clusterSubnets := make(map[string]*kopsapi.ClusterSubnetSpec)
//for _, subnet := range cluster.Spec.Subnets {
// if clusterSubnets[subnet.Name] != nil {
// 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 {View on GitHub (pinned to 4c8573c808)
Solutions
- Open the cluster spec and add a name to every member under spec.etcdClusters[].members[] (conventionally the instance group name, e.g. "a", "b", "c").
- Use `kops get cluster --full` to inspect the effective spec and find the member with the missing name.
- If generating specs with code/templates, ensure EtcdMemberSpec.Name is always populated before calling PopulateClusterSpec.
Example fix
# before
etcdClusters:
- name: main
members:
- instanceGroup: control-plane-ap-south-1a
# after
etcdClusters:
- name: main
members:
- name: a
instanceGroup: control-plane-ap-south-1a Defensive patterns
Strategy: validation
Validate before calling
for i, etcd := range cluster.Spec.EtcdClusters {
for j, m := range etcd.Members {
if m.Name == "" {
return fmt.Errorf("etcdClusters[%d].members[%d] missing name", i, j)
}
}
} Type guard
func etcdMemberHasName(m kopsapi.EtcdMemberSpec) bool { return m.Name != "" } Prevention
- Always name etcd members after their instance groups (a, b, c)
- Run `kops get cluster --full` and review etcdClusters before kops update
- Validate specs with `kops replace -f` dry-run workflows before applying
When it happens
Trigger: Calling PopulateClusterSpec (via kops create/update) with an EtcdClusters entry whose Members array contains an EtcdMemberSpec with Name set to "" — typically from a hand-written or templated cluster YAML missing the name field.
Common situations: Hand-editing the cluster spec and omitting `name:` on an etcd member; tooling that generates member entries programmatically and leaves Name unset; upgrading configs written for very old kops formats where members were zone-based and names were inferred.
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
- EtcdMember %s:%s did not specify a InstanceGroup
- validation of the full cluster and instance group specs fail
- error populating configuration: %v
- configuration must include Subnets
- must configure at least one Node InstanceGroup
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/37deddfa178f55fd.
Report an issue: GitHub.