kubernetes/kops · error

invalid EtcdClusterSpec (member not found in all nodes): %q

Error message

invalid EtcdClusterSpec (member not found in all nodes): %q

What it means

ParseEtcdClusterSpec throws this error when the member name before the '/' (myname) is not present in the comma-separated list of all node names after the '/'. The spec's structure parsed fine, but it is internally inconsistent: the node claims membership in an etcd cluster that does not list it. This guards against stale or partially updated volume tags.

Source

Thrown at pkg/etcd/cluster_spec.go:59

func ParseEtcdClusterSpec(clusterKey, v string) (*EtcdClusterSpec, error) {
	v = strings.TrimSpace(v)

	tokens := strings.Split(v, "/")
	if len(tokens) != 2 {
		return nil, fmt.Errorf("invalid EtcdClusterSpec (expected two tokens): %q", v)
	}

	nodeName := tokens[0]
	nodeNames := strings.Split(tokens[1], ",")

	found := false
	for _, s := range nodeNames {
		if s == nodeName {
			found = true
		}
	}
	if !found {
		return nil, fmt.Errorf("invalid EtcdClusterSpec (member not found in all nodes): %q", v)
	}

	c := &EtcdClusterSpec{
		ClusterKey: clusterKey,
		NodeName:   nodeName,
		NodeNames:  nodeNames,
	}
	return c, nil
}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Compare the quoted value in the error: the name before '/' must exactly (case-sensitively) match one of the comma-separated entries after '/'. Fix the volume tag accordingly.
  2. If the volume belongs to a replaced/removed etcd member, remove or re-tag the stale volume rather than reusing it in the current cluster.
  3. Re-run the etcd member replacement flow (`kops replace` / rolling-update) so kops rewrites the tags consistently.
  4. Check for typos or case mismatches in node names between the instance name and the etcd cluster member list.

Example fix

// before: myname not present in allnames
v := "nodeX/node1,node2,node3"
// after: myname is a member of the allnames list
v := "node1/node1,node2,node3"
Defensive patterns

Strategy: validation

Validate before calling

// validate internal consistency before parsing
func validEtcdClusterSpecMembership(v string) bool {
    v = strings.TrimSpace(v)
    parts := strings.Split(v, "/")
    if len(parts) != 2 {
        return false
    }
    for _, n := range strings.Split(parts[1], ",") {
        if n == parts[0] {
            return true
        }
    }
    return false
}

Prevention

When it happens

Trigger: findEtcdStatus passes a tag like "nodeX/node1,node2,node3" where nodeX does not appear among node1,node2,node3. Typically the volume was detached and reattached to a different instance, the tag was edited changing only one half, or the etcd cluster membership changed (member replaced/removed) without updating this volume's tag.

Common situations: After an etcd member replacement or cluster resize where the old volume retains its old tag; disk/instance reuse across clusters with mismatched names; case-sensitivity or typo differences between myname and the allnames list (e.g. "Node1" vs "node1"); manually copying tags between volumes.

Related errors


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