kubernetes/kops · error
could not find one of launch configuration, mixed instances
Error message
could not find one of launch configuration, mixed instances policy, or launch template
What it means
Raised in the Terraform rendering path for an AutoScalingGroup task: kops requires exactly one launch mechanism (launch configuration, mixed instances policy, or launch template) on the ASG task, and none was set. This is an internal consistency error, not an AWS API error.
Source
Thrown at upup/pkg/fi/cloudup/awstasks/autoscalinggroup.go:1003
OnDemandPercentageAboveBaseCapacity: e.MixedOnDemandAboveBase,
SpotAllocationStrategy: e.MixedSpotAllocationStrategy,
SpotInstancePool: e.MixedSpotInstancePools,
SpotMaxPrice: e.MixedSpotMaxPrice,
},
},
},
}
for _, x := range e.MixedInstanceOverrides {
tf.MixedInstancesPolicy[0].LaunchTemplate[0].Override = append(tf.MixedInstancesPolicy[0].LaunchTemplate[0].Override, &terraformAutoscalingMixedInstancesPolicyLaunchTemplateOverride{InstanceType: new(x)})
}
} else if e.LaunchTemplate != nil {
tf.LaunchTemplate = &terraformAutoscalingLaunchTemplateSpecification{
LaunchTemplateID: e.LaunchTemplate.TerraformLink(),
Version: e.LaunchTemplate.VersionLink(),
}
} else {
return fmt.Errorf("could not find one of launch configuration, mixed instances policy, or launch template")
}
role := ""
for k := range e.Tags {
if strings.HasPrefix(k, CloudTagInstanceGroupRolePrefix) {
suffix := strings.TrimPrefix(k, CloudTagInstanceGroupRolePrefix)
if suffix == "control-plane" {
suffix = "master"
}
if role != "" && role != suffix {
return fmt.Errorf("Found multiple role tags: %q vs %q", role, suffix)
}
role = suffix
}
}
if e.LaunchTemplate != nil && role != "" {
for _, sg := range e.LaunchTemplate.SecurityGroups {View on GitHub (pinned to 4c8573c808)
Solutions
- Re-generate the manifests with `kops update cluster` so launch template tasks are created and wired to the ASG.
- Upgrade/downgrade to a consistent kops binary version matching the state store, then re-run apply.
- Inspect `kops get ig <name> -o yaml` and ensure the instance group has a valid machineType/image so a launch template can be built.
- If persistent, restore the cluster spec from backup or recreate the instance group.
Example fix
// before: instance group without image/machineType
metadata:
name: nodes
spec: {}
// after
metadata:
name: nodes
spec:
machineType: t3.medium
image: ubuntu-2204-amd64 Defensive patterns
Strategy: validation
Validate before calling
// guard before rendering: exactly one launch mechanism must be set
func validateASGLaunch(e *AutoScalingGroup) error {
set := 0
for _, ok := range []bool{e.LaunchConfiguration != nil, e.MixedInstancesPolicy != nil, e.LaunchTemplate != nil} {
if ok { set++ }
}
if set != 1 { return fmt.Errorf("need exactly one of launchConfiguration/mixedInstancesPolicy/launchTemplate, got %d", set) }
return nil
} Type guard
func hasLaunchMechanism(e *AutoScalingGroup) bool {
return e.LaunchConfiguration != nil || e.MixedInstancesPolicy != nil || e.LaunchTemplate != nil
} Try / catch
if err := runTerraformRender(); err != nil {
if strings.Contains(err.Error(), "could not find one of launch configuration") {
return fmt.Errorf("instanceGroup spec incomplete - regenerate with `kops update cluster`: %w", err)
}
return err
} Prevention
- Always define machineType/image on instance groups.
- Use the same kops binary version as the state store.
- Regenerate manifests with kops update cluster after upgrading kops.
When it happens
Trigger: TerraformLink/rendering the ASG when e.LaunchConfiguration, e.MixedInstancesPolicy, and e.LaunchTemplate are all nil — e.g. an instance-group produced without a launch template (older spec or a code path that failed to populate the launch template task).
Common situations: Hand-edited or partially applied cluster spec where the instanceGroup lost its machine type/launch template wiring; version-skew between kops client and state store produced by a newer kops version; custom controllers calling fi apply with incomplete task graphs.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Found multiple role tags: %q vs %q
- invalid base channel location: %q
- cannot find subnet %q (declared in instance group %q, not fo
- error parsing configuration: %v
- assetsLocation.fileRepository must be set to remap asset %v
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/3b5699417814ee79.
Report an issue: GitHub.