{"record":{"id":"f40ee613252fc017","repo":"kubernetes/kops","slug":"insufficient-little-cidrs-remaining-for-automati","errorCode":null,"errorMessage":"insufficient (little) CIDRs remaining for automatic CIDR allocation to subnet %q","messagePattern":"insufficient \\(little\\) CIDRs remaining for automatic CIDR allocation to subnet %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/subnets.go","lineNumber":226,"sourceCode":"\tif len(bigCIDRs) == 0 {\n\t\treturn fmt.Errorf(\"could not find any non-overlapping CIDRs in parent NetworkCIDR; cannot automatically assign CIDR to subnet\")\n\t}\n\n\t// Assign CIDRs to little subnets\n\tif len(littleSubnets) > 0 {\n\t\tlittleCIDRs, err := subnet.SplitInto8(bigCIDRs[0])\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tbigCIDRs = bigCIDRs[1:]\n\n\t\tfor _, subnet := range littleSubnets {\n\t\t\tif subnet.CIDR != \"\" {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tif len(littleCIDRs) == 0 {\n\t\t\t\treturn fmt.Errorf(\"insufficient (little) CIDRs remaining for automatic CIDR allocation to subnet %q\", subnet.Name)\n\t\t\t}\n\t\t\tsubnet.CIDR = littleCIDRs[0].String()\n\t\t\tklog.Infof(\"Assigned CIDR %s to subnet %s\", subnet.CIDR, subnet.Name)\n\n\t\t\tlittleCIDRs = littleCIDRs[1:]\n\t\t}\n\t}\n\n\t// Assign CIDRs to big subnets\n\tfor _, subnet := range bigSubnets {\n\t\tif subnet.CIDR != \"\" {\n\t\t\tcontinue\n\t\t}\n\t\tif subnet.IPv6CIDR != \"\" && subnet.Type == kops.SubnetTypePrivate {\n\t\t\tcontinue\n\t\t}\n\n\t\tif len(bigCIDRs) == 0 {","sourceCodeStart":208,"sourceCodeEnd":244,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/subnets.go#L208-L244","documentation":"When assigning CIDRs to 'little' subnets (Utility/Internal), kOps splits the first big CIDR into 8 children. If there are more little subnets needing auto-assignment than available children, it errors rather than reusing or overlapping CIDRs.","triggerScenarios":"More subnets classified as Utility (or other little types) without explicit CIDRs than the 8 pieces produced by SplitInto8 of bigCIDRs[0], during `kops update cluster`.","commonSituations":"Clusters with many AZs each adding a utility subnet; adding several subnets at once without specifying CIDRs; very small parent networkCIDR yielding tiny carvable ranges.","solutions":["Explicitly set cidr on the extra little subnets so auto-allocation is not needed","Enlarge networkCIDR so the split produces sufficient room, or add additionalNetworkCIDR","Reduce the number of auto-assigned utility subnets (e.g. share one utility subnet across AZs)"],"exampleFix":"// before\nsubnets:\n- name: utility-us-east-1a  # no cidr, 9th little subnet\n// after\nsubnets:\n- name: utility-us-east-1a\n  cidr: 10.0.9.0/24","handlingStrategy":"validation","validationCode":"little := 0\nfor _, s := range subnets {\n\tif s.Type == kops.SubnetTypeUtility && s.CIDR == \"\" { little++ }\n}\n// SplitInto8 yields 8 children per big CIDR; ensure little <= 8 * len(bigCIDRs)","typeGuard":null,"tryCatchPattern":"if err := PerformAssignments(c, cloud); err != nil {\n\tif strings.Contains(err.Error(), \"insufficient (little) CIDRs\") { /* add explicit CIDRs for extra utility subnets */ }\n\treturn err\n}","preventionTips":["Give utility subnets in many-AZ clusters explicit CIDRs","Keep the number of auto-allocated little subnets at or below 8 per big CIDR","Size networkCIDR generously when using multiple utility subnets"],"tags":["network","cidr","capacity","kops"],"backgroundTag":"cidr-space-exhausted","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"}