From 579233f26fdf021d41e3c45723a8282bf340e7d9 Mon Sep 17 00:00:00 2001 From: tytv2 Date: Wed, 15 Jul 2026 11:02:19 +0700 Subject: [PATCH] fix(vks): --secondary-subnets takes CIDRs, not subnet IDs The API field secondarySubnets expects address ranges (e.g. 10.5.60.0/22), but the help text and docs said "Secondary subnet IDs" and used sub-*/sec-sub-* examples. An agent or user following that guidance builds a body the backend rejects. Correct the flag help, the option description, and both examples to CIDR strings. Behavior is unchanged (the value is forwarded verbatim). --- docs/commands/vks/create-cluster.md | 8 ++++---- go/cmd/vks/create_cluster.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/commands/vks/create-cluster.md b/docs/commands/vks/create-cluster.md index 86a450c..07cb277 100644 --- a/docs/commands/vks/create-cluster.md +++ b/docs/commands/vks/create-cluster.md @@ -137,11 +137,11 @@ Availability-zone strategy for the cluster. **`--secondary-subnets`** (list<string>) -Secondary subnet IDs, comma-separated. Used by `CILIUM_NATIVE_ROUTING`. +Secondary subnet **CIDRs**, comma-separated — the address ranges themselves, **not** subnet IDs (`sec-sub-…`). Used by `CILIUM_NATIVE_ROUTING`. - Required: Conditional — at least one value is required when `--network-type` is `CILIUM_NATIVE_ROUTING`. - Constraints: up to 10 entries. -- Syntax: `sub-aaa,sub-bbb` +- Syntax: `10.5.60.0/22,10.5.71.0/26` **`--node-netmask-size`** (integer) @@ -217,7 +217,7 @@ grn vks create-cluster \ --vpc-id net-abc12345-0000-0000-0000-000000000001 \ --subnet-id sub-abc12345-0000-0000-0000-000000000001 \ --node-netmask-size 25 \ - --secondary-subnets sub-abc12345-0000-0000-0000-000000000002 + --secondary-subnets 10.5.60.0/22,10.5.71.0/26 ``` Create a cluster with TIGERA (CIDR required) and auto-healing: @@ -242,6 +242,6 @@ grn vks create-cluster \ --network-type CILIUM_NATIVE_ROUTING \ --vpc-id net-abc12345-0000-0000-0000-000000000001 \ --node-netmask-size 25 \ - --secondary-subnets sub-abc12345-0000-0000-0000-000000000002 \ + --secondary-subnets 10.5.60.0/22,10.5.71.0/26 \ --dry-run ``` diff --git a/go/cmd/vks/create_cluster.go b/go/cmd/vks/create_cluster.go index b3ba7c9..cff78c4 100644 --- a/go/cmd/vks/create_cluster.go +++ b/go/cmd/vks/create_cluster.go @@ -40,7 +40,7 @@ func init() { f.String("block-store-csi-plugin", "enabled", "Block store CSI plugin (enabled, disabled)") f.String("service-endpoint", "disabled", "Service endpoint (enabled, disabled)") f.String("az-strategy", "SINGLE", "Availability zone strategy") - f.String("secondary-subnets", "", "Secondary subnet IDs, comma-separated (required for CILIUM_NATIVE_ROUTING, at least one, max 10)") + f.String("secondary-subnets", "", "Secondary subnet CIDRs, comma-separated, e.g. 10.5.60.0/22 (required for CILIUM_NATIVE_ROUTING, at least one, max 10). NOT subnet IDs") f.String("list-subnet-ids", "", "Subnet IDs for the cluster (comma-separated)") f.Int("node-netmask-size", 0, "Node netmask size: 24, 25, or 26 (required for CILIUM_NATIVE_ROUTING)") f.String("auto-upgrade-config", "", "Auto-upgrade config (shorthand time=03:00,weekdays=Mon or JSON; use JSON for multiple weekdays)")