{"record":{"id":"37deddfa178f55fd","repo":"kubernetes/kops","slug":"etcdmember-d-of-etcd-cluster-s-did-not-specify","errorCode":null,"errorMessage":"EtcdMember #%d of etcd-cluster %s did not specify a Name","messagePattern":"EtcdMember #(.+?) of etcd-cluster (.+?) did not specify a Name","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/populate_cluster_spec.go","lineNumber":127,"sourceCode":"\t\t// TODO: Check that instance groups referenced here exist\n\t\t//clusterSubnets := make(map[string]*kopsapi.ClusterSubnetSpec)\n\t\t//for _, subnet := range cluster.Spec.Subnets {\n\t\t//\tif clusterSubnets[subnet.Name] != nil {\n\t\t//\t\treturn fmt.Errorf(\"Subnets contained a duplicate value: %v\", subnet.Name)\n\t\t//\t}\n\t\t//\tclusterSubnets[subnet.Name] = subnet\n\t\t//}\n\n\t\t// Check etcd configuration\n\t\t{\n\t\t\tfor i, etcd := range cluster.Spec.EtcdClusters {\n\t\t\t\tif etcd.Name == \"\" {\n\t\t\t\t\treturn fmt.Errorf(\"EtcdClusters #%d did not specify a Name\", i)\n\t\t\t\t}\n\n\t\t\t\tfor i, m := range etcd.Members {\n\t\t\t\t\tif m.Name == \"\" {\n\t\t\t\t\t\treturn fmt.Errorf(\"EtcdMember #%d of etcd-cluster %s did not specify a Name\", i, etcd.Name)\n\t\t\t\t\t}\n\n\t\t\t\t\tif fi.ValueOf(m.InstanceGroup) == \"\" {\n\t\t\t\t\t\treturn fmt.Errorf(\"EtcdMember %s:%s did not specify a InstanceGroup\", etcd.Name, m.Name)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tetcdInstanceGroups := make(map[string]kopsapi.EtcdMemberSpec)\n\t\t\t\tetcdNames := make(map[string]kopsapi.EtcdMemberSpec)\n\n\t\t\t\tfor _, m := range etcd.Members {\n\t\t\t\t\tif _, ok := etcdNames[m.Name]; ok {\n\t\t\t\t\t\treturn fmt.Errorf(\"EtcdMembers found with same name %q in etcd-cluster %q\", m.Name, etcd.Name)\n\t\t\t\t\t}\n\n\t\t\t\t\tinstanceGroupName := fi.ValueOf(m.InstanceGroup)\n\n\t\t\t\t\tif _, ok := etcdInstanceGroups[instanceGroupName]; ok {","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/populate_cluster_spec.go#L109-L145","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"# before\netcdClusters:\n- name: main\n  members:\n  - instanceGroup: control-plane-ap-south-1a\n# after\netcdClusters:\n- name: main\n  members:\n  - name: a\n    instanceGroup: control-plane-ap-south-1a","handlingStrategy":"validation","validationCode":"for i, etcd := range cluster.Spec.EtcdClusters {\n\tfor j, m := range etcd.Members {\n\t\tif m.Name == \"\" {\n\t\t\treturn fmt.Errorf(\"etcdClusters[%d].members[%d] missing name\", i, j)\n\t\t}\n\t}\n}","typeGuard":"func etcdMemberHasName(m kopsapi.EtcdMemberSpec) bool { return m.Name != \"\" }","tryCatchPattern":null,"preventionTips":["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"],"tags":["etcd","cluster-spec","validation"],"backgroundTag":"missing-required-argument","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}