kubernetes/kops · error

no InstanceGroup objects found

Error message

no InstanceGroup objects found

What it means

RunGetInstanceGroups found the cluster but the InstanceGroup list (after filtering by any --name arguments) is empty. It fires when the cluster has no InstanceGroups stored, or when none of the explicitly requested instance group names match, so there is nothing to print.

Source

Thrown at cmd/kops/get_instancegroups.go:119

	if cluster == nil {
		return fmt.Errorf("cluster %q was not found", options.ClusterName)
	}

	list, err := clientset.InstanceGroupsFor(cluster).List(ctx, metav1.ListOptions{})
	if err != nil {
		return err
	}

	instancegroups, err := filterInstanceGroupsByName(options.InstanceGroupNames, list.Items)
	if err != nil {
		return err
	}

	singleObject := false

	if len(instancegroups) == 0 {
		return fmt.Errorf("no InstanceGroup objects found")
	} else if len(instancegroups) == 1 {
		singleObject = true
	}

	var obj []runtime.Object
	if options.Output != OutputTable {
		for _, c := range instancegroups {
			obj = append(obj, c)
		}
	}

	switch options.Output {
	case OutputTable:
		return igOutputTable(cluster, instancegroups, out)
	case OutputYaml:
		return fullOutputYAML(out, obj...)
	case OutputJSON:
		return fullOutputJSON(out, singleObject, obj...)

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Drop the name filters to list all instance groups in the cluster
  2. Create an instance group (kops create ig) if the cluster has none
  3. Check the filtered instance group names for typos
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at cmd/kops/get_instancegroups.go:119 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/300bc21f1ff8094a. Report an issue: GitHub.