diff --git a/cmd/scw/testdata/test-all-usage-k8s-pool-create-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-pool-create-usage.golden index ce5df828a0..c980a48a2c 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-pool-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-pool-create-usage.golden @@ -7,13 +7,13 @@ USAGE: EXAMPLES: Create a pool named bar with 2 DEV1-XL on a given cluster - scw k8s pool create 11111111-1111-1111-111111111111 name=bar node-type=DEV1-XL size=2 + scw k8s pool create cluster-id=11111111-1111-1111-111111111111 name=bar node-type=DEV1-XL size=2 Create a pool named fish with 5 GP1-L with autoscaling enabled within 0 and 10 nodes, autohealing enabled, and containerd as the container runtime on a given cluster - scw k8s pool create 11111111-1111-1111-111111111111 name=fish node-type=GP1-L size=5 min-size=0 max-size=10 autoscaling=true autohealing=true container-runtime=containerd + scw k8s pool create cluster-id=11111111-1111-1111-111111111111 name=fish node-type=GP1-L size=5 min-size=0 max-size=10 autoscaling=true autohealing=true container-runtime=containerd Create a tagged pool named turtle with 1 GP1-S which is using the already created placement group 2222222222222-2222-222222222222 for all the nodes in the pool on a given cluster - scw k8s pool create 11111111-1111-1111-111111111111 name=turtle node-type=GP1-S size=1 placement-group-id=2222222222222-2222-222222222222 tags.0=turtle tags.1=placement-group + scw k8s pool create cluster-id=11111111-1111-1111-111111111111 name=turtle node-type=GP1-S size=1 placement-group-id=2222222222222-2222-222222222222 tags.0=turtle tags.1=placement-group ARGS: cluster-id The ID of the cluster in which the pool will be created diff --git a/cmd/scw/testdata/test-all-usage-k8s-pool-list-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-pool-list-usage.golden index 34bee9c0f3..41c4dc7ff8 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-pool-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-pool-list-usage.golden @@ -7,16 +7,16 @@ USAGE: EXAMPLES: List all pools for a given cluster - scw k8s pool list 11111111-1111-1111-111111111111 + scw k8s pool list cluster-id=11111111-1111-1111-111111111111 List all scaling pools for a given cluster - scw k8s pool list 11111111-1111-1111-111111111111 status=scaling + scw k8s pool list cluster-id=11111111-1111-1111-111111111111 status=scaling List all pools for a given cluster that contain the word foo in the pool name - scw k8s pool list 11111111-1111-1111-111111111111 name=foo + scw k8s pool list cluster-id=11111111-1111-1111-111111111111 name=foo List all pools for a given cluster and order them by ascending creation date - scw k8s pool list 11111111-1111-1111-111111111111 order-by=created_at_asc + scw k8s pool list cluster-id=11111111-1111-1111-111111111111 order-by=created_at_asc ARGS: cluster-id The ID of the cluster from which the pools will be listed from diff --git a/docs/commands/k8s.md b/docs/commands/k8s.md index d63c49eed7..b6f1da931d 100644 --- a/docs/commands/k8s.md +++ b/docs/commands/k8s.md @@ -736,17 +736,17 @@ scw k8s pool create [arg=value ...] Create a pool named bar with 2 DEV1-XL on a given cluster ``` -scw k8s pool create 11111111-1111-1111-111111111111 name=bar node-type=DEV1-XL size=2 +scw k8s pool create cluster-id=11111111-1111-1111-111111111111 name=bar node-type=DEV1-XL size=2 ``` Create a pool named fish with 5 GP1-L with autoscaling enabled within 0 and 10 nodes, autohealing enabled, and containerd as the container runtime on a given cluster ``` -scw k8s pool create 11111111-1111-1111-111111111111 name=fish node-type=GP1-L size=5 min-size=0 max-size=10 autoscaling=true autohealing=true container-runtime=containerd +scw k8s pool create cluster-id=11111111-1111-1111-111111111111 name=fish node-type=GP1-L size=5 min-size=0 max-size=10 autoscaling=true autohealing=true container-runtime=containerd ``` Create a tagged pool named turtle with 1 GP1-S which is using the already created placement group 2222222222222-2222-222222222222 for all the nodes in the pool on a given cluster ``` -scw k8s pool create 11111111-1111-1111-111111111111 name=turtle node-type=GP1-S size=1 placement-group-id=2222222222222-2222-222222222222 tags.0=turtle tags.1=placement-group +scw k8s pool create cluster-id=11111111-1111-1111-111111111111 name=turtle node-type=GP1-S size=1 placement-group-id=2222222222222-2222-222222222222 tags.0=turtle tags.1=placement-group ``` @@ -839,22 +839,22 @@ scw k8s pool list [arg=value ...] List all pools for a given cluster ``` -scw k8s pool list 11111111-1111-1111-111111111111 +scw k8s pool list cluster-id=11111111-1111-1111-111111111111 ``` List all scaling pools for a given cluster ``` -scw k8s pool list 11111111-1111-1111-111111111111 status=scaling +scw k8s pool list cluster-id=11111111-1111-1111-111111111111 status=scaling ``` List all pools for a given cluster that contain the word foo in the pool name ``` -scw k8s pool list 11111111-1111-1111-111111111111 name=foo +scw k8s pool list cluster-id=11111111-1111-1111-111111111111 name=foo ``` List all pools for a given cluster and order them by ascending creation date ``` -scw k8s pool list 11111111-1111-1111-111111111111 order-by=created_at_asc +scw k8s pool list cluster-id=11111111-1111-1111-111111111111 order-by=created_at_asc ``` diff --git a/internal/namespaces/k8s/v1/k8s_cli.go b/internal/namespaces/k8s/v1/k8s_cli.go index 1e860034ff..64de66da92 100644 --- a/internal/namespaces/k8s/v1/k8s_cli.go +++ b/internal/namespaces/k8s/v1/k8s_cli.go @@ -1108,19 +1108,19 @@ func k8sPoolList() *core.Command { Examples: []*core.Example{ { Short: "List all pools for a given cluster", - Raw: `scw k8s pool list 11111111-1111-1111-111111111111`, + Raw: `scw k8s pool list cluster-id=11111111-1111-1111-111111111111`, }, { Short: "List all scaling pools for a given cluster", - Raw: `scw k8s pool list 11111111-1111-1111-111111111111 status=scaling`, + Raw: `scw k8s pool list cluster-id=11111111-1111-1111-111111111111 status=scaling`, }, { Short: "List all pools for a given cluster that contain the word foo in the pool name", - Raw: `scw k8s pool list 11111111-1111-1111-111111111111 name=foo`, + Raw: `scw k8s pool list cluster-id=11111111-1111-1111-111111111111 name=foo`, }, { Short: "List all pools for a given cluster and order them by ascending creation date", - Raw: `scw k8s pool list 11111111-1111-1111-111111111111 order-by=created_at_asc`, + Raw: `scw k8s pool list cluster-id=11111111-1111-1111-111111111111 order-by=created_at_asc`, }, }, View: &core.View{Fields: []*core.ViewField{ @@ -1312,15 +1312,15 @@ func k8sPoolCreate() *core.Command { Examples: []*core.Example{ { Short: "Create a pool named bar with 2 DEV1-XL on a given cluster", - Raw: `scw k8s pool create 11111111-1111-1111-111111111111 name=bar node-type=DEV1-XL size=2`, + Raw: `scw k8s pool create cluster-id=11111111-1111-1111-111111111111 name=bar node-type=DEV1-XL size=2`, }, { Short: "Create a pool named fish with 5 GP1-L with autoscaling enabled within 0 and 10 nodes, autohealing enabled, and containerd as the container runtime on a given cluster", - Raw: `scw k8s pool create 11111111-1111-1111-111111111111 name=fish node-type=GP1-L size=5 min-size=0 max-size=10 autoscaling=true autohealing=true container-runtime=containerd`, + Raw: `scw k8s pool create cluster-id=11111111-1111-1111-111111111111 name=fish node-type=GP1-L size=5 min-size=0 max-size=10 autoscaling=true autohealing=true container-runtime=containerd`, }, { Short: "Create a tagged pool named turtle with 1 GP1-S which is using the already created placement group 2222222222222-2222-222222222222 for all the nodes in the pool on a given cluster", - Raw: `scw k8s pool create 11111111-1111-1111-111111111111 name=turtle node-type=GP1-S size=1 placement-group-id=2222222222222-2222-222222222222 tags.0=turtle tags.1=placement-group`, + Raw: `scw k8s pool create cluster-id=11111111-1111-1111-111111111111 name=turtle node-type=GP1-S size=1 placement-group-id=2222222222222-2222-222222222222 tags.0=turtle tags.1=placement-group`, }, }, }