kubernetes/kops · error
could not find flavor with name %v
Error message
could not find flavor with name %v
What it means
getFlavor iterates the extracted flavors looking for one whose Name matches the requested name; if none matches, it returns this error. It means the configured instance type/flavor name does not exist in this OpenStack project/region.
Source
Thrown at upup/pkg/fi/cloudup/openstack/instance.go:393
func getFlavor(c OpenstackCloud, name string) (*flavors.Flavor, error) {
opts := flavors.ListOpts{}
pager := flavors.ListDetail(c.ComputeClient(), opts)
page, err := pager.AllPages(context.TODO())
if err != nil {
return nil, fmt.Errorf("failed to list flavors: %v", err)
}
fs, err := flavors.ExtractFlavors(page)
if err != nil {
return nil, fmt.Errorf("failed to extract flavors: %v", err)
}
for _, f := range fs {
if f.Name == name {
return &f, nil
}
}
return nil, fmt.Errorf("could not find flavor with name %v", name)
}
View on GitHub (pinned to 4c8573c808)
Solutions
- List available flavors with `openstack flavor list` and use an exact name in the InstanceGroup spec
- Correct the instanceType in the instance group (kops edit ig <ig>) and update the cluster
- Ask the cloud admin to create/enable the required flavor if it genuinely should exist
Example fix
// before: kops instance group spec machineType: m5.large // after: a real OpenStack flavor name machineType: m1.medium
Defensive patterns
Strategy: validation
Validate before calling
// resolve the flavor before applying the cluster/instance group
func validateFlavorExists(cl OpenstackCloud, name string) error {
_, err := GetFlavor(cl, name)
return err // 'could not find flavor with name' surfaces here
} Prevention
- Run `openstack flavor list` and copy exact flavor names into instance group specs
- Never assume AWS/GCE machine types exist on OpenStack
- Check flavor availability per region and per project (RBAC may hide flavors)
- Validate machineType in CI with a kops cluster template linter
When it happens
Trigger: GetFlavor called with a flavor name that does not exist in the target Nova deployment — typically the instanceType from the kops InstanceGroup does not match any flavor name in the cloud.
Common situations: Copy-pasting AWS instance types (e.g. m5.large) into an OpenStack cluster spec; flavor renamed or absent in a different region/project; flavors not exposed to the project.
Related errors
- cannot find subnet %q (declared in instance group %q, not fo
- InstanceGroup name is missing
- instance group %q not found
- unknown group type for group %q
- could not determine any subnets for InstanceGroup %q; subnet
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/a0ba826cbb6956f5.
Report an issue: GitHub.