{"record":{"id":"9b8dab8416efda4d","repo":"kubernetes/kops","slug":"unknown-etcd-cluster-key-q","errorCode":null,"errorMessage":"unknown etcd cluster key %q","messagePattern":"unknown etcd cluster key %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/components/etcdmanager/model.go","lineNumber":376,"sourceCode":"\t}\n\n\tswitch etcdCluster.Name {\n\tcase \"main\":\n\t\tclusterName = \"etcd\"\n\n\tcase \"events\":\n\t\t// ok\n\n\tcase \"cilium\":\n\t\tif !featureflag.APIServerNodes.Enabled() {\n\t\t\tclientHost = b.Cluster.APIInternalName()\n\t\t}\n\n\tcase \"leases\":\n\t\t// ok\n\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unknown etcd cluster key %q\", etcdCluster.Name)\n\t}\n\n\tif backupStore == \"\" {\n\t\treturn nil, fmt.Errorf(\"backupStore must be set for use with etcd-manager\")\n\t}\n\n\tname := clusterName\n\tif !strings.HasPrefix(name, \"etcd\") {\n\t\t// For sanity, and to avoid collisions in directories / dns\n\t\treturn nil, fmt.Errorf(\"unexpected name for etcd cluster (must start with etcd): %q\", name)\n\t}\n\tlogFile := \"/var/log/\" + name + \".log\"\n\n\tconfig := &config{\n\t\tContainerized: true,\n\t\tClusterName:   clusterName,\n\t\tBackupStore:   backupStore,\n\t\tGrpcPort:      ports.GRPCPort,","sourceCodeStart":358,"sourceCodeEnd":394,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/model/components/etcdmanager/model.go#L358-L394","documentation":"buildPod switches on etcdCluster.Name and only accepts the known etcd cluster keys ('etcd', 'etcd-events', and 'leases' as a no-op). Any other cluster name is rejected, since etcd-manager only provisions the standard main/events pairs.","triggerScenarios":"A spec EtcdClusters entry whose Name is not etcd/etcd-events/leases (e.g. 'etcd-metering', 'my-etcd', or a missing 'etcd' prefix) reaches model building during `kops update cluster`.","commonSituations":"Attempts to add a third custom etcd cluster; typo in cluster name; copied spec fragments renamed for another purpose; legacy specs from clusters with extra etcd clusters.","solutions":["Rename the cluster to 'etcd' or 'etcd-events', or remove the extra etcdClusters entry.","Run additional etcd clusters outside kOps management if you truly need a third one.","Fix spec-generation tooling that emits custom etcd cluster names."],"exampleFix":"// before\netcdClusters:\n- name: etcd-metrics\n  ...\n// after (remove it, or rename to a supported key)\netcdClusters:\n- name: etcd\n  ...","handlingStrategy":"validation","validationCode":"allowed := map[string]bool{\"etcd\": true, \"etcd-events\": true, \"leases\": true}\nfor _, c := range spec.EtcdClusters {\n\tif !allowed[c.Name] {\n\t\treturn fmt.Errorf(\"etcd cluster name %q not supported by etcd-manager\", c.Name)\n\t}\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only define the canonical 'etcd' and 'etcd-events' clusters in the spec.","Run extra etcd clusters outside kOps if needed.","Add a CI check rejecting non-canonical etcd cluster names in manifests."],"tags":["kops","etcd-manager","naming","cluster-spec"],"backgroundTag":"unsupported-resource-name","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}