{"record":{"id":"4faca28877eca926","repo":"kubernetes/kops","slug":"instancegroup-q-not-found-4faca2","errorCode":null,"errorMessage":"InstanceGroup %q not found","messagePattern":"InstanceGroup %q not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/template_functions.go","lineNumber":600,"sourceCode":"\t\treturn \"\", fmt.Errorf(\"task %T does not implement HasName\", task)\n\t}\n\tname := fi.ValueOf(hasName.GetName())\n\tif name == \"\" {\n\t\treturn \"\", fmt.Errorf(\"task %T did not have a name\", task)\n\t}\n\treturn fi.TypeNameForTask(task) + \"/\" + name, nil\n}\n\n// SharedVPC is a simple helper function which makes the templates for a shared VPC clearer\nfunc (tf *TemplateFunctions) SharedVPC() bool {\n\treturn tf.Cluster.SharedVPC()\n}\n\n// GetInstanceGroup returns the instance group with the specified name\nfunc (tf *TemplateFunctions) GetInstanceGroup(name string) (*kops.InstanceGroup, error) {\n\tig := tf.KopsModelContext.FindInstanceGroup(name)\n\tif ig == nil {\n\t\treturn nil, fmt.Errorf(\"InstanceGroup %q not found\", name)\n\t}\n\treturn ig, nil\n}\n\n// ControlPlaneControllerReplicas returns the amount of replicas for a controllers that should run in the cluster.\n// deployOnWorkersIfExternalPermissons indicates if a controller can run on worker nodes when external IAM permissions is enabled for the cluster.\nfunc (tf *TemplateFunctions) ControlPlaneControllerReplicas(deployOnWorkersIfExternalPermissions bool) int {\n\t// Check if we are running on worker nodes\n\tif deployOnWorkersIfExternalPermissions && tf.Cluster.Spec.IAM != nil && fi.ValueOf(tf.Cluster.Spec.IAM.UseServiceAccountExternalPermissions) {\n\t\t// If we only have one control plane node, we still only run one instance,\n\t\t// because most controllers still need a lease from the control plane,\n\t\t// so we can't get higher availability by running multiple instances\n\t\t// (though we would get faster time-to-recovery)\n\t\t//\n\t\t// This also supports running with one control-plane node and one worker node,\n\t\t// and we may have spreading constraints that prevent both pods running on\n\t\t// the same worker node.  Issue #15852\n\t\tif tf.HasHighlyAvailableControlPlane() {","sourceCodeStart":582,"sourceCodeEnd":618,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/template_functions.go#L582-L618","documentation":"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.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/template_functions.go:600 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the instance group name in the template matches an instance group in the cluster spec (kops get instancegroups)","Add the missing instance group to the cluster spec if it was intended","Fix typos or stale references after renaming an instance group"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}