{"record":{"id":"81d186852f045feb","repo":"kubernetes/kops","slug":"leaderelectiontimeout-not-supported-by-etcd-manage","errorCode":null,"errorMessage":"LeaderElectionTimeout not supported by etcd-manager","messagePattern":"LeaderElectionTimeout not supported by etcd-manager","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/components/etcdmanager/model.go","lineNumber":439,"sourceCode":"\t{\n\t\t// Determine scheme: HTTPS by default, but allow HTTP for events cluster\n\t\t// when EtcdEventsHTTP feature flag is enabled\n\t\tscheme := \"https\"\n\t\tif etcdCluster.Name == \"events\" && featureflag.EtcdEventsHTTP.Enabled() {\n\t\t\tscheme = \"http\"\n\t\t\tconfig.EtcdInsecure = new(true)\n\t\t\tklog.Warningf(\"etcd cluster %q is configured with TLS disabled (HTTP) via KOPS_FEATURE_FLAGS=EtcdEventsHTTP. This is for experiments only.\", etcdCluster.Name)\n\t\t}\n\n\t\tconfig.PeerUrls = fmt.Sprintf(\"%s://__name__:%d\", scheme, ports.PeerPort)\n\t\tconfig.ClientUrls = fmt.Sprintf(\"%s://%s:%d\", scheme, clientHost, ports.ClientPort)\n\t\tconfig.QuarantineClientUrls = fmt.Sprintf(\"%s://__name__:%d\", scheme, ports.QuarantinedGRPCPort)\n\n\t\t// TODO: We need to wire these into the etcd-manager spec\n\t\t// // add timeout/heartbeat settings\n\t\tif etcdCluster.LeaderElectionTimeout != nil {\n\t\t\t//      envs = append(envs, v1.EnvVar{Name: \"ETCD_ELECTION_TIMEOUT\", Value: convEtcdSettingsToMs(etcdClusterSpec.LeaderElectionTimeout)})\n\t\t\treturn nil, fmt.Errorf(\"LeaderElectionTimeout not supported by etcd-manager\")\n\t\t}\n\t\tif etcdCluster.HeartbeatInterval != nil {\n\t\t\t//      envs = append(envs, v1.EnvVar{Name: \"ETCD_HEARTBEAT_INTERVAL\", Value: convEtcdSettingsToMs(etcdClusterSpec.HeartbeatInterval)})\n\t\t\treturn nil, fmt.Errorf(\"HeartbeatInterval not supported by etcd-manager\")\n\t\t}\n\t}\n\n\t{\n\t\tswitch b.Cluster.GetCloudProvider() {\n\t\tcase kops.CloudProviderAWS:\n\t\t\tconfig.VolumeProvider = \"aws\"\n\n\t\t\tconfig.VolumeTag = []string{\n\t\t\t\tfmt.Sprintf(\"kubernetes.io/cluster/%s=owned\", b.Cluster.Name),\n\t\t\t\tawsup.TagNameEtcdClusterPrefix + etcdCluster.Name,\n\t\t\t\tawsup.TagNameRolePrefix + \"control-plane=1\",\n\t\t\t}\n\t\t\tconfig.VolumeNameTag = awsup.TagNameEtcdClusterPrefix + etcdCluster.Name","sourceCodeStart":421,"sourceCodeEnd":457,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/model/components/etcdmanager/model.go#L421-L457","documentation":"etcdCluster.LeaderElectionTimeout is a legacy (non-manager) etcd tuning knob. etcd-manager does not wire it into its spec, so instead of silently ignoring it, buildPod returns this error to force the user to remove the field.","triggerScenarios":"Spec contains `etcdClusters[].leaderElectionTimeout` while the cluster uses etcd-manager; detected during `kops update cluster` model build.","commonSituations":"Cluster spec carried over from pre-etcd-manager kOps versions; docs/blog snippets with etcd tuning copied into a manager-based cluster.","solutions":["Remove `leaderElectionTimeout` from the etcdCluster spec and re-run `kops update cluster`.","If tuning is needed, manage election timeout via etcd-manager's own configuration/override mechanism.","Confirm the cluster is manager-based (`kops get cluster -o yaml` shows no etcdManager bypass) — the field is only meaningful for legacy etcd."],"exampleFix":"// before\netcdClusters:\n- name: etcd\n  leaderElectionTimeout: 2s\n  ...\n// after\netcdClusters:\n- name: etcd\n  ...","handlingStrategy":"validation","validationCode":"for _, c := range spec.EtcdClusters {\n\tif c.LeaderElectionTimeout != nil {\n\t\treturn fmt.Errorf(\"leaderElectionTimeout must be removed for etcd-manager clusters\")\n\t}\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Strip legacy etcd tuning fields when migrating to etcd-manager.","Tune etcd via etcd-manager's supported mechanisms, not legacy env-style fields.","Diff old cluster specs against current `kops create cluster` output when upgrading."],"tags":["kops","etcd-manager","unsupported-field","etcd-tuning"],"backgroundTag":"unsupported-config-option","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"}