kubernetes/kops · error

HeartbeatInterval not supported by etcd-manager

Error message

HeartbeatInterval not supported by etcd-manager

What it means

Same pattern as LeaderElectionTimeout: etcdCluster.HeartbeatInterval is a legacy etcd setting that etcd-manager does not support, and rather than dropping it silently buildPod fails with this error so the config stays honest.

Source

Thrown at pkg/model/components/etcdmanager/model.go:443

		if etcdCluster.Name == "events" && featureflag.EtcdEventsHTTP.Enabled() {
			scheme = "http"
			config.EtcdInsecure = new(true)
			klog.Warningf("etcd cluster %q is configured with TLS disabled (HTTP) via KOPS_FEATURE_FLAGS=EtcdEventsHTTP. This is for experiments only.", etcdCluster.Name)
		}

		config.PeerUrls = fmt.Sprintf("%s://__name__:%d", scheme, ports.PeerPort)
		config.ClientUrls = fmt.Sprintf("%s://%s:%d", scheme, clientHost, ports.ClientPort)
		config.QuarantineClientUrls = fmt.Sprintf("%s://__name__:%d", scheme, ports.QuarantinedGRPCPort)

		// TODO: We need to wire these into the etcd-manager spec
		// // add timeout/heartbeat settings
		if etcdCluster.LeaderElectionTimeout != nil {
			//      envs = append(envs, v1.EnvVar{Name: "ETCD_ELECTION_TIMEOUT", Value: convEtcdSettingsToMs(etcdClusterSpec.LeaderElectionTimeout)})
			return nil, fmt.Errorf("LeaderElectionTimeout not supported by etcd-manager")
		}
		if etcdCluster.HeartbeatInterval != nil {
			//      envs = append(envs, v1.EnvVar{Name: "ETCD_HEARTBEAT_INTERVAL", Value: convEtcdSettingsToMs(etcdClusterSpec.HeartbeatInterval)})
			return nil, fmt.Errorf("HeartbeatInterval not supported by etcd-manager")
		}
	}

	{
		switch b.Cluster.GetCloudProvider() {
		case kops.CloudProviderAWS:
			config.VolumeProvider = "aws"

			config.VolumeTag = []string{
				fmt.Sprintf("kubernetes.io/cluster/%s=owned", b.Cluster.Name),
				awsup.TagNameEtcdClusterPrefix + etcdCluster.Name,
				awsup.TagNameRolePrefix + "control-plane=1",
			}
			config.VolumeNameTag = awsup.TagNameEtcdClusterPrefix + etcdCluster.Name

		case kops.CloudProviderAzure:
			config.VolumeProvider = "azure"

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Remove `heartbeatInterval` from the etcdCluster spec.
  2. Apply any needed tuning through etcd-manager's supported configuration instead.
  3. Validate the cleaned spec with `kops update cluster --dry-run` before applying.

Example fix

// before
etcdClusters:
- name: etcd
  heartbeatInterval: 200ms
  ...
// after
etcdClusters:
- name: etcd
  ...
Defensive patterns

Strategy: validation

Validate before calling

for _, c := range spec.EtcdClusters {
	if c.HeartbeatInterval != nil {
		return fmt.Errorf("heartbeatInterval must be removed for etcd-manager clusters")
	}
}

Prevention

When it happens

Trigger: Spec contains `etcdClusters[].heartbeatInterval` while etcd-manager manages the cluster; raised during model build in `kops update cluster`.

Common situations: Migrated pre-manager cluster specs; heartbeat tuning snippets copied from legacy kOps documentation; automated spec tools emitting legacy fields.

Related errors


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/1012faf71b48815f. Report an issue: GitHub.