{"record":{"id":"e842b3330f5cd136","repo":"kubernetes/kops","slug":"on-akamai-linode-subnets-must-include-regions","errorCode":null,"errorMessage":"on Akamai (Linode), subnets must include Regions","messagePattern":"on Akamai \\(Linode\\), subnets must include Regions","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/utils.go","lineNumber":219,"sourceCode":"\n\t\t\tcloud = scwCloud\n\t\t}\n\tcase kops.CloudProviderMetal:\n\t\tmetalCloud, err := metal.NewCloud()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error initializing Metal cloud: %w\", err)\n\t\t}\n\t\tcloud = metalCloud\n\n\tcase kops.CloudProviderLinode:\n\t\tfor _, subnet := range cluster.Spec.Networking.Subnets {\n\t\t\tif subnet.Region != \"\" {\n\t\t\t\tregion = subnet.Region\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif region == \"\" {\n\t\t\treturn nil, fmt.Errorf(\"on Akamai (Linode), subnets must include Regions\")\n\t\t}\n\n\t\tlinodeCloud, err := linode.NewCloud(region)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error initializing Akamai (Linode) cloud: %w\", err)\n\t\t}\n\n\t\tcloud = linodeCloud\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unknown CloudProvider %q\", cluster.GetCloudProvider())\n\t}\n\treturn cloud, nil\n}\n\nfunc FindDNSHostedZone(dns dnsprovider.Interface, clusterDNSName string, dnsType kops.DNSType) (string, error) {\n\tklog.V(2).Infof(\"Querying for all DNS zones to find match for %q\", clusterDNSName)\n\n\tclusterDNSName = \".\" + strings.TrimSuffix(clusterDNSName, \".\")","sourceCodeStart":201,"sourceCodeEnd":237,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/utils.go#L201-L237","documentation":"kops's BuildCloud initializes the cloud provider for a cluster. For the Akamai (Linode) provider, kops derives the Linode region from the first subnet that has a Region set; every subnet declaration is expected to carry a region because Linode has no zone-level abstraction. If no subnet specifies a region, kops cannot construct a Linode cloud client and aborts with this error.","triggerScenarios":"Running `kops create cluster`, `kops update cluster`, `kops create ig`, `kops delete cluster`, or `kops delete instance` where cluster.Spec.CloudProvider is linode/akamai and every entry in cluster.spec.networking.subnets has an empty region field (or there are no subnets).","commonSituations":"Hand-written cluster manifests that omit `region:` on subnets (e.g. copying an AWS example that uses only `zone:` or CIDR fields); tooling that generates subnets without the Linode-specific region key; upgrading older configs where region was optional for another provider.","solutions":["Set `region:` (a Linode region slug such as us-east or eu-west) on at least one — ideally all — subnets in cluster.spec.networking.subnets.","Regenerate the manifest with `kops create cluster --cloud linode --zones us-east ...` so kops fills regions automatically.","Verify the cluster spec: `kops get cluster <name> -o yaml` and confirm each subnet has a non-empty region before re-running."],"exampleFix":"# before\nsubnets:\n- name: main\n  cidr: 10.0.1.0/24\n# after\nsubnets:\n- name: main\n  cidr: 10.0.1.0/24\n  region: us-east","handlingStrategy":"validation","validationCode":"for _, s := range cluster.Spec.Networking.Subnets {\n    if s.Region == \"\" {\n        return fmt.Errorf(\"subnet %q: Linode requires region\", s.Name)\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set region on every subnet when cloudProvider is linode/akamai.","Scaffold clusters with `kops create cluster --cloud linode --zones <region>` instead of hand-editing YAML.","Validate the manifest with `kops get cluster -o yaml` before apply."],"tags":["linode","akamai","cluster-config","subnet"],"backgroundTag":"missing-required-cluster-config-field","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"}