diff --git a/cmd/scw/testdata/test-all-usage-k8s-cluster-create-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-cluster-create-usage.golden index d9c1f7dc3a..0328e37de8 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-cluster-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-cluster-create-usage.golden @@ -62,6 +62,9 @@ ARGS: [open-id-connect-config.required-claim.{index}] Multiple key=value pairs describing a required claim in the ID token. If set, the claims are verified to be present in the ID token with a matching value [apiserver-cert-sans.{index}] Additional Subject Alternative Names for the Kubernetes API server certificate [private-network-id] Private network ID for internal cluster communication (cannot be changed later). For Kapsule clusters, if none is provided, a private network will be created + [pod-cidr] Subnet used for the Pod CIDR (cannot be changed later) + [service-cidr] Subnet used for the Service CIDR (cannot be changed later) + [service-dns-ip] IP used for the DNS Service (cannot be changes later). If unset, default to Service CIDR's network + 10 [organization-id] Organization ID to use. If none is passed the default organization ID will be used [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw) diff --git a/docs/commands/k8s.md b/docs/commands/k8s.md index 9c5eb214de..aaba1c1eb5 100644 --- a/docs/commands/k8s.md +++ b/docs/commands/k8s.md @@ -208,6 +208,9 @@ scw k8s cluster create [arg=value ...] | open-id-connect-config.required-claim.{index} | | Multiple key=value pairs describing a required claim in the ID token. If set, the claims are verified to be present in the ID token with a matching value | | apiserver-cert-sans.{index} | | Additional Subject Alternative Names for the Kubernetes API server certificate | | private-network-id | | Private network ID for internal cluster communication (cannot be changed later). For Kapsule clusters, if none is provided, a private network will be created | +| pod-cidr | | Subnet used for the Pod CIDR (cannot be changed later) | +| service-cidr | | Subnet used for the Service CIDR (cannot be changed later) | +| service-dns-ip | | IP used for the DNS Service (cannot be changes later). If unset, default to Service CIDR's network + 10 | | organization-id | | Organization ID to use. If none is passed the default organization ID will be used | | region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config | diff --git a/internal/namespaces/k8s/v1/k8s_cli.go b/internal/namespaces/k8s/v1/k8s_cli.go index 6cda71f545..1e58cc19c1 100644 --- a/internal/namespaces/k8s/v1/k8s_cli.go +++ b/internal/namespaces/k8s/v1/k8s_cli.go @@ -677,6 +677,27 @@ func k8sClusterCreate() *core.Command { Deprecated: false, Positional: false, }, + { + Name: "pod-cidr", + Short: `Subnet used for the Pod CIDR (cannot be changed later)`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "service-cidr", + Short: `Subnet used for the Service CIDR (cannot be changed later)`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "service-dns-ip", + Short: `IP used for the DNS Service (cannot be changes later). If unset, default to Service CIDR's network + 10`, + Required: false, + Deprecated: false, + Positional: false, + }, core.OrganizationIDArgSpec(), core.RegionArgSpec( scw.RegionFrPar,