kubernetes/kops · error

found multiple instance groups matching %q

Error message

found multiple instance groups matching %q

What it means

keyedByName guard: after deriving the expected VM Scale Set name (%q) from an instance group's role, that name was already present in the map — two instance groups resolve to the same scale set name (duplicate names or ambiguous role suffixing).

Source

Thrown at upup/pkg/fi/cloudup/azure/status.go:225

}

// keyedByName creates a map of instance groups keyed by VM Scale Set names.
func keyedByName(instancegroups []*kops.InstanceGroup, clusterName string) (map[string]*kops.InstanceGroup, error) {
	m := map[string]*kops.InstanceGroup{}
	for _, ig := range instancegroups {
		var name string
		switch {
		case ig.Spec.Role.HasControlPlane():
			name = ig.Name + ".masters." + clusterName
		case ig.Spec.Role.HasNode(),
			ig.Spec.Role.HasBastion():
			name = ig.Name + "." + clusterName
		default:
			klog.Warningf("Ignoring InstanceGroup of unknown role %q", ig.Spec.Role)
			continue
		}
		if _, ok := m[name]; ok {
			return nil, fmt.Errorf("found multiple instance groups matching %q", name)
		}
		m[name] = ig
	}

	return m, nil
}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Run 'kops get ig' and rename or delete the duplicate instance group
  2. Verify each instance group name is unique within the cluster
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/azure/status.go:225 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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