kubernetes/kops · error
no suitable subnets found
Error message
no suitable subnets found
What it means
No control-plane instance group yielded a private or dual-stack subnet, so there is no suitable subnet to attach the internal API load balancer to; all master subnets were skipped or absent.
Source
Thrown at pkg/model/azuremodel/api_loadbalancer.go:151
// subnetForLoadBalancer returns the subnet the loadbalancer will use.
func (c *AzureModelContext) subnetForLoadBalancer() (*kops.ClusterSubnetSpec, error) {
// Get all master instance group subnets
for _, ig := range c.MasterInstanceGroups() {
subnets, err := c.GatherSubnets(ig)
if err != nil {
return nil, err
}
if len(subnets) != 1 {
return nil, fmt.Errorf("expected exactly one subnet for InstanceGroup %q; subnets was %s", ig.Name, ig.Spec.Subnets)
}
if subnets[0].Type != kops.SubnetTypeDualStack && subnets[0].Type != kops.SubnetTypePrivate {
continue
}
return subnets[0], nil
}
return nil, fmt.Errorf("no suitable subnets found")
}
View on GitHub (pinned to 4c8573c808)
Solutions
- Ensure at least one control-plane instance group uses a Private or DualStack subnet
- Review subnet types in the cluster spec
- Re-run kops update
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/model/azuremodel/api_loadbalancer.go:151 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/157fce8e2a92c12e.
Report an issue: GitHub.