{"record":{"id":"b4388261d32f4b12","repo":"kubernetes/kops","slug":"we-currently-do-not-support-multiple-etcd-ips","errorCode":null,"errorMessage":"we currently do not support multiple Etcd IPs","messagePattern":"we currently do not support multiple Etcd IPs","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/nodemodel/nodeupconfigbuilder.go","lineNumber":317,"sourceCode":"\t// Bake control-plane IPs into /etc/hosts (for api.internal and kops-controller.internal):\n\t//   - non-CP roles in any cluster that exposes kops-controller on the API LB,\n\t//   - any role on clouds without DNS-based kops-controller discovery.\n\t// CP nodes get api.internal=127.0.0.1 from etc_hosts.go's IsMaster branch and don't\n\t// connect to kops-controller.internal externally, so they don't need APIServerIPs.\n\tif cluster.UsesLoadBalancerForKopsController() && !ig.RunsAPIServer() {\n\t\tbootConfig.APIServerIPs = controlPlaneIPs\n\t} else {\n\t\tswitch cluster.GetCloudProvider() {\n\t\tcase kops.CloudProviderHetzner, kops.CloudProviderScaleway, kops.CloudProviderDO, kops.CloudProviderMetal:\n\t\t\tbootConfig.APIServerIPs = controlPlaneIPs\n\t\t}\n\t}\n\n\t// Bake Etcd LB IPs into /etc/hosts if etcd is not local and there is an API Server.\n\tif role.HasAPIServer() {\n\t\tif len(wellKnownAddresses[wellknownservices.EtcdMain]) > 0 {\n\t\t\tif len(wellKnownAddresses[wellknownservices.EtcdMain]) > 1 {\n\t\t\t\treturn nil, nil, fmt.Errorf(\"we currently do not support multiple Etcd IPs\")\n\t\t\t}\n\t\t\tbootConfig.EtcdIPs = wellKnownAddresses[wellknownservices.EtcdMain]\n\t\t}\n\t}\n\n\tuseConfigServer := !ig.RunsAPIServer()\n\tif useConfigServer {\n\t\tbootConfig.ConfigServer = buildConfigServerOptions(cluster.ObjectMeta.Name, config.CAs[fi.CertificateIDCA], bootConfig.APIServerIPs)\n\t\tdelete(config.CAs, fi.CertificateIDCA)\n\t} else {\n\t\tbootConfig.ConfigBase = new(n.configBase.Path())\n\t}\n\n\tfor _, manifest := range n.assetBuilder.StaticManifests() {\n\t\tif !manifest.AppliesToRole(role) {\n\t\t\tcontinue\n\t\t}\n","sourceCodeStart":299,"sourceCodeEnd":335,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/nodemodel/nodeupconfigbuilder.go#L299-L335","documentation":"For API-server groups, well-known EtcdMain addresses are baked into bootConfig.EtcdIPs (e.g. for /etc/hosts). The code supports at most one Etcd IP; if more than one address is registered for EtcdMain, this error aborts config build.","triggerScenarios":"BuildConfig with role.HasAPIServer() and wellKnownAddresses[EtcdMain] containing 2+ entries — e.g. clusters where etcd main is fronted by multiple registered IPs, or address registration bug adding duplicates.","commonSituations":"Multi-member etcd clusters registering all member IPs as well-known addresses; misconfigured etcd cluster with load balancer IPs; kOps version too old for the cluster topology (newer topologies removed this limitation).","solutions":["Upgrade kOps/nodeup to a version supporting multiple etcd IPs (this limitation was lifted in later versions)","Ensure only one address is registered for wellKnownServices.EtcdMain (fix etcd registration or use a single LB IP)","Reduce the etcd main cluster topology exposed to API-server nodes or adjust wellKnownAddresses construction"],"exampleFix":"// before\naddresses[wellknownservices.EtcdMain] = []string{\"10.0.0.1\", \"10.0.0.2\"}\n// after\naddresses[wellknownservices.EtcdMain] = []string{\"10.0.0.1\"} // single IP, or upgrade kOps","handlingStrategy":"validation","validationCode":"if len(addresses[wellknownservices.EtcdMain]) > 1 {\n    return fmt.Errorf(\"pre-check failed: %d EtcdMain addresses; max 1 supported\", len(addresses[wellknownservices.EtcdMain]))\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Upgrade kOps/nodeup to a version supporting multiple etcd IPs","Expose etcd via a single LB IP when using older kOps","Audit wellKnownAddresses construction for duplicate etcd registrations","Match etcd topology to the kOps version's supported topologies"],"tags":["etcd","nodeup","topology","limitation"],"backgroundTag":"multiple-etcd-ips-unsupported","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"}