kubernetes/kops · error

InstanceGroup %q not found

Error message

InstanceGroup %q not found

What it means

Returned by the GetInstanceGroup template helper when no instance group with the requested name exists in tf.KopsModelContext (or the model's instance group index). It fires when a template references an InstanceGroup by name that was not defined in the cluster spec — a typo in the name or a missing IG in the kOps spec.

Source

Thrown at upup/pkg/fi/cloudup/template_functions.go:600

		return "", fmt.Errorf("task %T does not implement HasName", task)
	}
	name := fi.ValueOf(hasName.GetName())
	if name == "" {
		return "", fmt.Errorf("task %T did not have a name", task)
	}
	return fi.TypeNameForTask(task) + "/" + name, nil
}

// SharedVPC is a simple helper function which makes the templates for a shared VPC clearer
func (tf *TemplateFunctions) SharedVPC() bool {
	return tf.Cluster.SharedVPC()
}

// GetInstanceGroup returns the instance group with the specified name
func (tf *TemplateFunctions) GetInstanceGroup(name string) (*kops.InstanceGroup, error) {
	ig := tf.KopsModelContext.FindInstanceGroup(name)
	if ig == nil {
		return nil, fmt.Errorf("InstanceGroup %q not found", name)
	}
	return ig, nil
}

// ControlPlaneControllerReplicas returns the amount of replicas for a controllers that should run in the cluster.
// deployOnWorkersIfExternalPermissons indicates if a controller can run on worker nodes when external IAM permissions is enabled for the cluster.
func (tf *TemplateFunctions) ControlPlaneControllerReplicas(deployOnWorkersIfExternalPermissions bool) int {
	// Check if we are running on worker nodes
	if deployOnWorkersIfExternalPermissions && tf.Cluster.Spec.IAM != nil && fi.ValueOf(tf.Cluster.Spec.IAM.UseServiceAccountExternalPermissions) {
		// If we only have one control plane node, we still only run one instance,
		// because most controllers still need a lease from the control plane,
		// so we can't get higher availability by running multiple instances
		// (though we would get faster time-to-recovery)
		//
		// This also supports running with one control-plane node and one worker node,
		// and we may have spreading constraints that prevent both pods running on
		// the same worker node.  Issue #15852
		if tf.HasHighlyAvailableControlPlane() {

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Verify the instance group name in the template matches an instance group in the cluster spec (kops get instancegroups)
  2. Add the missing instance group to the cluster spec if it was intended
  3. Fix typos or stale references after renaming an instance group
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/template_functions.go:600 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/4faca28877eca926. Report an issue: GitHub.