From 48778038f8c10519644a663ae6a921253543e980 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Thu, 26 Dec 2024 15:23:32 +0000 Subject: [PATCH] feat: update generated APIs --- ...-all-usage-k8s-cluster-create-usage.golden | 20 +- ...-all-usage-k8s-cluster-delete-usage.golden | 10 +- ...est-all-usage-k8s-cluster-get-usage.golden | 2 +- ...-cluster-list-available-types-usage.golden | 2 +- ...uster-list-available-versions-usage.golden | 2 +- ...8s-cluster-migrate-to-sbs-csi-usage.golden | 3 +- ...k8s-cluster-reset-admin-token-usage.golden | 4 +- ...ll-usage-k8s-cluster-set-type-usage.golden | 4 +- ...-all-usage-k8s-cluster-update-usage.golden | 9 +- ...all-usage-k8s-cluster-upgrade-usage.golden | 8 +- ...est-all-usage-k8s-node-delete-usage.golden | 8 +- .../test-all-usage-k8s-node-get-usage.golden | 2 +- .../test-all-usage-k8s-node-list-usage.golden | 8 +- ...est-all-usage-k8s-node-reboot-usage.golden | 4 +- ...st-all-usage-k8s-node-replace-usage.golden | 4 +- ...est-all-usage-k8s-pool-create-usage.golden | 18 +- ...est-all-usage-k8s-pool-delete-usage.golden | 2 +- .../test-all-usage-k8s-pool-get-usage.golden | 2 +- .../test-all-usage-k8s-pool-list-usage.golden | 8 +- ...est-all-usage-k8s-pool-update-usage.golden | 11 +- ...st-all-usage-k8s-pool-upgrade-usage.golden | 5 +- .../test-all-usage-k8s-pool-usage.golden | 2 +- ...est-all-usage-k8s-version-get-usage.golden | 4 +- docs/commands/k8s.md | 146 ++++++------ go.mod | 2 +- go.sum | 4 +- internal/namespaces/k8s/v1/k8s_cli.go | 222 ++++++++++-------- 27 files changed, 276 insertions(+), 240 deletions(-) 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 16129a3a03..2d1c4af60b 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 @@ -6,15 +6,15 @@ USAGE: scw k8s cluster create [arg=value ...] EXAMPLES: - Create a Kubernetes cluster named foo with cilium as CNI, in version 1.27.0 and with a pool named default composed of 3 DEV1-M - scw k8s cluster create name=foo version=1.27.0 pools.0.size=3 pools.0.node-type=DEV1-M pools.0.name=default + Create a Kubernetes cluster named foo with cilium as CNI, in version 1.31.2 and with a pool named default composed of 3 DEV1-M + scw k8s cluster create name=foo version=1.31.2 pools.0.size=3 pools.0.node-type=DEV1-M pools.0.name=default - Create a Kubernetes cluster named bar, tagged, calico as CNI, in version 1.27.0 and with a tagged pool named default composed of 2 RENDER-S and autohealing and autoscaling enabled (between 1 and 10 nodes) - scw k8s cluster create name=bar version=1.27.0 tags.0=tag1 tags.1=tag2 cni=calico pools.0.size=2 pools.0.node-type=RENDER-S pools.0.min-size=1 pools.0.max-size=10 pools.0.autohealing=true pools.0.autoscaling=true pools.0.tags.0=pooltag1 pools.0.tags.1=pooltag2 pools.0.name=default + Create a Kubernetes cluster named bar, tagged, calico as CNI, in version 1.31.2 and with a tagged pool named default composed of 2 RENDER-S and autohealing and autoscaling enabled (between 1 and 10 nodes) + scw k8s cluster create name=bar version=1.31.2 tags.0=tag1 tags.1=tag2 cni=calico pools.0.size=2 pools.0.node-type=RENDER-S pools.0.min-size=1 pools.0.max-size=10 pools.0.autohealing=true pools.0.autoscaling=true pools.0.tags.0=pooltag1 pools.0.tags.1=pooltag2 pools.0.name=default ARGS: [project-id] Project ID to use. If none is passed the default project ID will be used - [type] Type of the cluster (possible values are kapsule, multicloud, kapsule-dedicated-8, kapsule-dedicated-16) + [type] Type of the cluster. See [list available cluster types](#list-available-cluster-types-for-a-cluster) for a list of valid types name= Cluster name [description] Cluster description [tags.{index}] Tags associated with the cluster @@ -22,23 +22,23 @@ ARGS: cni=cilium Container Network Interface (CNI) plugin running in the cluster (unknown_cni | cilium | calico | weave | flannel | kilo | none) [pools.{index}.name] Name of the pool [pools.{index}.node-type] Node type is the type of Scaleway Instance wanted for the pool. Nodes with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST). 'external' is a special node type used to provision instances from other cloud providers in a Kosmos Cluster - [pools.{index}.placement-group-id] Placement group ID in which all the nodes of the pool will be created + [pools.{index}.placement-group-id] Placement group ID in which all the nodes of the pool will be created, placement groups are limited to 20 instances. [pools.{index}.autoscaling] Defines whether the autoscaling feature is enabled for the pool [pools.{index}.size] Size (number of nodes) of the pool [pools.{index}.min-size] Defines the minimum size of the pool. Note that this field is only used when autoscaling is enabled on the pool [pools.{index}.max-size] Defines the maximum size of the pool. Note that this field is only used when autoscaling is enabled on the pool - [pools.{index}.container-runtime] Customization of the container runtime is available for each pool. Note that `docker` has been deprecated since version 1.20 and will be removed by version 1.24 (unknown_runtime | docker | containerd | crio) + [pools.{index}.container-runtime] Customization of the container runtime is available for each pool (unknown_runtime | docker | containerd | crio) [pools.{index}.autohealing] Defines whether the autohealing feature is enabled for the pool - [pools.{index}.tags.{index}] Tags associated with the pool + [pools.{index}.tags.{index}] Tags associated with the pool, see [managing tags](https://www.scaleway.com/en/docs/containers/kubernetes/api-cli/managing-tags) [pools.{index}.kubelet-args.{key}] Kubelet arguments to be used by this pool. Note that this feature is experimental [pools.{index}.upgrade-policy.max-unavailable] The maximum number of nodes that can be not ready at the same time [pools.{index}.upgrade-policy.max-surge] The maximum number of nodes to be created during the upgrade [pools.{index}.zone] Zone in which the pool's nodes will be spawned - [pools.{index}.root-volume-type] Defines the system volume disk type. Two different types of volume (`volume_type`) are provided: `l_ssd` is a local block storage which means your system is stored locally on your node's hypervisor. `b_ssd` is a remote block storage which means your system is stored on a centralized and resilient cluster (default_volume_type | l_ssd | b_ssd | sbs_5k | sbs_15k) + [pools.{index}.root-volume-type] Defines the system volume disk type. Several types of volume (`volume_type`) are provided: (default_volume_type | l_ssd | b_ssd | sbs_5k | sbs_15k) [pools.{index}.root-volume-size] System volume disk size [pools.{index}.public-ip-disabled] Defines if the public IP should be removed from Nodes. To use this feature, your Cluster must have an attached Private Network set up with a Public Gateway [autoscaler-config.scale-down-disabled] Disable the cluster autoscaler - [autoscaler-config.scale-down-delay-after-add] How long after scale up that scale down evaluation resumes + [autoscaler-config.scale-down-delay-after-add] How long after scale up the scale down evaluation resumes [autoscaler-config.estimator] Type of resource estimator to be used in scale up (unknown_estimator | binpacking) [autoscaler-config.expander] Type of node group expander to be used in scale up (unknown_expander | random | most_pods | least_waste | priority | price) [autoscaler-config.ignore-daemonsets-utilization] Ignore DaemonSet pods when calculating resource utilization for scaling down diff --git a/cmd/scw/testdata/test-all-usage-k8s-cluster-delete-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-cluster-delete-usage.golden index b47a3a37e4..f3f8136a2d 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-cluster-delete-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-cluster-delete-usage.golden @@ -1,16 +1,16 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Delete a specific Kubernetes cluster and all its associated pools and nodes. Note that this method will not delete any Load Balancer or Block Volume that are associated with the cluster. +Delete a specific Kubernetes cluster and all its associated pools and nodes, and possibly its associated Load Balancers or Block Volumes. USAGE: scw k8s cluster delete [arg=value ...] EXAMPLES: - Delete a cluster - scw k8s cluster delete 11111111-1111-1111-111111111111 + Delete a cluster without deleting its Block volumes and Load Balancers + scw k8s cluster delete 11111111-1111-1111-1111-111111111111 - Delete a cluster with its Block volumes and Load Balancers - scw k8s cluster delete 11111111-1111-1111-111111111111 with-additional-resources=true + Delete a cluster with its Block volumes and Load Balancers (best effort) + scw k8s cluster delete 11111111-1111-1111-1111-111111111111 with-additional-resources=true ARGS: cluster-id ID of the cluster to delete diff --git a/cmd/scw/testdata/test-all-usage-k8s-cluster-get-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-cluster-get-usage.golden index 28cb362430..a5886ff438 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-cluster-get-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-cluster-get-usage.golden @@ -7,7 +7,7 @@ USAGE: EXAMPLES: Get a cluster information - scw k8s cluster get 11111111-1111-1111-111111111111 + scw k8s cluster get 11111111-1111-1111-1111-111111111111 ARGS: cluster-id ID of the requested cluster diff --git a/cmd/scw/testdata/test-all-usage-k8s-cluster-list-available-types-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-cluster-list-available-types-usage.golden index 1fde63024b..1a3c446d8c 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-cluster-list-available-types-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-cluster-list-available-types-usage.golden @@ -7,7 +7,7 @@ USAGE: EXAMPLES: List all cluster types that a cluster can upgrade to - scw k8s cluster list-available-types 11111111-1111-1111-111111111111 + scw k8s cluster list-available-types 11111111-1111-1111-1111-111111111111 ARGS: cluster-id Cluster ID for which the available Kubernetes types will be listed diff --git a/cmd/scw/testdata/test-all-usage-k8s-cluster-list-available-versions-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-cluster-list-available-versions-usage.golden index ec5151ebec..569aaabd1f 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-cluster-list-available-versions-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-cluster-list-available-versions-usage.golden @@ -7,7 +7,7 @@ USAGE: EXAMPLES: List all versions that a cluster can upgrade to - scw k8s cluster list-available-versions 11111111-1111-1111-111111111111 + scw k8s cluster list-available-versions 11111111-1111-1111-1111-111111111111 ARGS: cluster-id Cluster ID for which the available Kubernetes versions will be listed diff --git a/cmd/scw/testdata/test-all-usage-k8s-cluster-migrate-to-sbs-csi-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-cluster-migrate-to-sbs-csi-usage.golden index 34959b07be..82be5b7062 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-cluster-migrate-to-sbs-csi-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-cluster-migrate-to-sbs-csi-usage.golden @@ -1,13 +1,14 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ Enable the latest CSI compatible with Scaleway Block Storage (SBS) and migrate all existing PersistentVolumes/VolumeSnapshotContents to SBS. +Make sure to have the necessary Quota before running this command. USAGE: scw k8s cluster migrate-to-sbs-csi [arg=value ...] EXAMPLES: Migrate a cluster to SBS CSI - scw k8s cluster migrate-to-sbs-csi 11111111-1111-1111-111111111111 + scw k8s cluster migrate-to-sbs-csi 11111111-1111-1111-1111-111111111111 ARGS: cluster-id Cluster ID for which the latest CSI compatible with Scaleway Block Storage will be enabled diff --git a/cmd/scw/testdata/test-all-usage-k8s-cluster-reset-admin-token-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-cluster-reset-admin-token-usage.golden index ca36ed5658..47d9975808 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-cluster-reset-admin-token-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-cluster-reset-admin-token-usage.golden @@ -1,13 +1,13 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Reset the admin token for a specific Kubernetes cluster. This will revoke the old admin token (which will not be usable afterwards) and create a new one. Note that you will need to download kubeconfig again to keep interacting with the cluster. +Reset the admin token for a specific Kubernetes cluster. This will revoke the old admin token (which will not be usable afterwards) and create a new one. Note that you will need to download the kubeconfig again to keep interacting with the cluster. USAGE: scw k8s cluster reset-admin-token [arg=value ...] EXAMPLES: Reset the admin token for a cluster - scw k8s cluster reset-admin-token 11111111-1111-1111-111111111111 + scw k8s cluster reset-admin-token 11111111-1111-1111-1111-111111111111 ARGS: cluster-id Cluster ID on which the admin token will be renewed diff --git a/cmd/scw/testdata/test-all-usage-k8s-cluster-set-type-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-cluster-set-type-usage.golden index 0ee9082533..f453b4adbc 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-cluster-set-type-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-cluster-set-type-usage.golden @@ -1,13 +1,13 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Change the type of a specific Kubernetes cluster. To see the possible values you can enter for the `type` field, [list available cluster types](#path-clusters-list-available-cluster-types-for-a-cluster). +Change the type of a specific Kubernetes cluster. To see the possible values you can enter for the `type` field, [list available cluster types](#list-available-cluster-types-for-a-cluster). USAGE: scw k8s cluster set-type [arg=value ...] EXAMPLES: Convert a kapsule cluster to a kapsule-dedicated-16 cluster - scw k8s cluster set-type 11111111-1111-1111-111111111111 type=kapsule-dedicated-16 + scw k8s cluster set-type 11111111-1111-1111-1111-111111111111 type=kapsule-dedicated-16 ARGS: cluster-id ID of the cluster to migrate from one type to another diff --git a/cmd/scw/testdata/test-all-usage-k8s-cluster-update-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-cluster-update-usage.golden index aa61cd0f2c..443be56db3 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-cluster-update-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-cluster-update-usage.golden @@ -6,8 +6,11 @@ USAGE: scw k8s cluster update [arg=value ...] EXAMPLES: - Add TTLAfterFinished and ServiceNodeExclusion as feature gates on a cluster - scw k8s cluster update 11111111-1111-1111-111111111111 feature-gates.0=TTLAfterFinished feature-gates.1=ServiceNodeExclusion + Add InPlacePodVerticalScaling and SidecarContainers as feature gates on a cluster + scw k8s cluster update 11111111-1111-1111-1111-111111111111 feature-gates.0=InPlacePodVerticalScaling feature-gates.1=SidecarContainers + + Remove all custom feature gates on a cluster + scw k8s cluster update 11111111-1111-1111-1111-111111111111 feature-gates=none ARGS: cluster-id ID of the cluster to update @@ -15,7 +18,7 @@ ARGS: [description] New description for the cluster [tags.{index}] New tags associated with the cluster [autoscaler-config.scale-down-disabled] Disable the cluster autoscaler - [autoscaler-config.scale-down-delay-after-add] How long after scale up that scale down evaluation resumes + [autoscaler-config.scale-down-delay-after-add] How long after scale up the scale down evaluation resumes [autoscaler-config.estimator] Type of resource estimator to be used in scale up (unknown_estimator | binpacking) [autoscaler-config.expander] Type of node group expander to be used in scale up (unknown_expander | random | most_pods | least_waste | priority | price) [autoscaler-config.ignore-daemonsets-utilization] Ignore DaemonSet pods when calculating resource utilization for scaling down diff --git a/cmd/scw/testdata/test-all-usage-k8s-cluster-upgrade-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-cluster-upgrade-usage.golden index 66bdb59853..1416417b3a 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-cluster-upgrade-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-cluster-upgrade-usage.golden @@ -6,11 +6,11 @@ USAGE: scw k8s cluster upgrade [arg=value ...] EXAMPLES: - Upgrade a cluster version 1.27.0 of Kubernetes (pools *are not* included) - scw k8s cluster upgrade 11111111-1111-1111-111111111111 version=1.27.0 + Upgrade a cluster to version 1.31.2 of Kubernetes (pools *are not* included) + scw k8s cluster upgrade 11111111-1111-1111-1111-111111111111 version=1.31.2 - Upgrade a cluster to version 1.27.0 of Kubernetes (pools *are* included) - scw k8s cluster upgrade 11111111-1111-1111-111111111111 version=1.27.0 upgrade-pools=true + Upgrade a cluster to version 1.31.2 of Kubernetes (pools *are* included) + scw k8s cluster upgrade 11111111-1111-1111-1111-111111111111 version=1.31.2 upgrade-pools=true ARGS: cluster-id ID of the cluster to upgrade diff --git a/cmd/scw/testdata/test-all-usage-k8s-node-delete-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-node-delete-usage.golden index bd4b6eecbb..6dd8d1b40e 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-node-delete-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-node-delete-usage.golden @@ -1,19 +1,19 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Delete a specific Node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster), disruption of your applications can be expected. +Delete a specific Node. The node will first be drained and pods will be rescheduled onto another node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster, or with specific constraints), disruption of your applications may occur. USAGE: scw k8s node delete [arg=value ...] EXAMPLES: Delete a node - scw k8s node delete 11111111-1111-1111-111111111111 + scw k8s node delete 11111111-1111-1111-1111-111111111111 Delete a node without evicting workloads - scw k8s node delete 11111111-1111-1111-111111111111 skip-drain=true + scw k8s node delete 11111111-1111-1111-1111-111111111111 skip-drain=true Replace a node by a new one - scw k8s node delete 11111111-1111-1111-111111111111 replace=true + scw k8s node delete 11111111-1111-1111-1111-111111111111 replace=true ARGS: node-id ID of the node to replace diff --git a/cmd/scw/testdata/test-all-usage-k8s-node-get-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-node-get-usage.golden index 9f8898566f..01b9e209a9 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-node-get-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-node-get-usage.golden @@ -7,7 +7,7 @@ USAGE: EXAMPLES: Get a node - scw k8s node get 11111111-1111-1111-111111111111 + scw k8s node get 11111111-1111-1111-1111-111111111111 ARGS: node-id ID of the requested node diff --git a/cmd/scw/testdata/test-all-usage-k8s-node-list-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-node-list-usage.golden index d3804f95f6..57dc40793d 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-node-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-node-list-usage.golden @@ -7,13 +7,13 @@ USAGE: EXAMPLES: List all the nodes in the cluster - scw k8s node list cluster-id=11111111-1111-1111-111111111111 + scw k8s node list cluster-id=11111111-1111-1111-1111-111111111111 - List all the nodes in the cluster's 2222222222222-2222-222222222222 pool - scw k8s node list cluster-id=11111111-1111-1111-111111111111 pool-id=2222222222222-2222-222222222222 + List all the nodes in the cluster's 22222222-2222-2222-2222-222222222222 pool + scw k8s node list cluster-id=11111111-1111-1111-1111-111111111111 pool-id=22222222-2222-2222-2222-222222222222 List all cluster nodes that are ready - scw k8s node list cluster-id=11111111-1111-1111-111111111111 status=ready + scw k8s node list cluster-id=11111111-1111-1111-1111-111111111111 status=ready ARGS: cluster-id Cluster ID from which the nodes will be listed from diff --git a/cmd/scw/testdata/test-all-usage-k8s-node-reboot-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-node-reboot-usage.golden index d6344e2a09..b55801df1f 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-node-reboot-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-node-reboot-usage.golden @@ -1,13 +1,13 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Reboot a specific Node. The node will first be cordoned (scheduling will be disabled on it). The existing pods on the node will then be drained and rescheduled onto another schedulable node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster), disruption of your applications can be expected. +Reboot a specific Node. The node will first be drained and pods will be rescheduled onto another node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster, or with specific constraints), disruption of your applications may occur. USAGE: scw k8s node reboot [arg=value ...] EXAMPLES: Reboot a node - scw k8s node reboot 11111111-1111-1111-111111111111 + scw k8s node reboot 11111111-1111-1111-1111-111111111111 ARGS: node-id ID of the node to reboot diff --git a/cmd/scw/testdata/test-all-usage-k8s-node-replace-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-node-replace-usage.golden index cb536433f0..2c7380ee9d 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-node-replace-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-node-replace-usage.golden @@ -1,13 +1,13 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Replace a specific Node. The node will first be cordoned (scheduling will be disabled on it). The existing pods on the node will then be drained and rescheduled onto another schedulable node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster), disruption of your applications can be expected. +Replace a specific Node. The node will first be drained and pods will be rescheduled onto another node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster, or with specific constraints), disruption of your applications may occur. USAGE: scw k8s node replace [arg=value ...] EXAMPLES: Replace a node - scw k8s node replace 11111111-1111-1111-111111111111 + scw k8s node replace 11111111-1111-1111-1111-111111111111 ARGS: node-id ID of the node to replace 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 a4e520cbaa..e139e2c29a 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,31 +7,31 @@ USAGE: EXAMPLES: Create a pool named 'bar' with 2 DEV1-XL on a cluster - scw k8s pool create cluster-id=11111111-1111-1111-111111111111 name=bar node-type=DEV1-XL size=2 + scw k8s pool create cluster-id=11111111-1111-1111-1111-111111111111 name=bar node-type=DEV1-XL size=2 - Create a pool named 'fish' with 5 GP1-L, autoscaling within 0 and 10 nodes and autohealing enabled, and containerd as the cluster container runtime - 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 pool named 'fish' with 5 GP1-L, autoscaling within 0 and 10 nodes and autohealing enabled + scw k8s pool create cluster-id=11111111-1111-1111-1111-111111111111 name=fish node-type=GP1-L size=5 min-size=0 max-size=10 autoscaling=true autohealing=true - 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 cluster - 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 + Create a tagged pool named 'turtle' with 1 GP1-S which is using the already created placement group 22222222-2222-2222-2222-222222222222 for all the nodes in the pool on a cluster + scw k8s pool create cluster-id=11111111-1111-1111-1111-111111111111 name=turtle node-type=GP1-S size=1 placement-group-id=22222222-2222-2222-2222-222222222222 tags.0=turtle-uses-placement-group ARGS: cluster-id Cluster ID to which the pool will be attached name= Pool name node-type=DEV1-M Node type is the type of Scaleway Instance wanted for the pool. Nodes with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST). 'external' is a special node type used to provision instances from other cloud providers in a Kosmos Cluster - [placement-group-id] Placement group ID in which all the nodes of the pool will be created + [placement-group-id] Placement group ID in which all the nodes of the pool will be created, placement groups are limited to 20 instances. [autoscaling] Defines whether the autoscaling feature is enabled for the pool size=1 Size (number of nodes) of the pool [min-size] Defines the minimum size of the pool. Note that this field is only used when autoscaling is enabled on the pool [max-size] Defines the maximum size of the pool. Note that this field is only used when autoscaling is enabled on the pool - [container-runtime] Customization of the container runtime is available for each pool. Note that `docker` has been deprecated since version 1.20 and will be removed by version 1.24 (unknown_runtime | docker | containerd | crio) + [container-runtime] Customization of the container runtime is available for each pool (unknown_runtime | docker | containerd | crio) [autohealing] Defines whether the autohealing feature is enabled for the pool - [tags.{index}] Tags associated with the pool + [tags.{index}] Tags associated with the pool, see [managing tags](https://www.scaleway.com/en/docs/containers/kubernetes/api-cli/managing-tags) [kubelet-args.{key}] Kubelet arguments to be used by this pool. Note that this feature is experimental [upgrade-policy.max-unavailable] [upgrade-policy.max-surge] [zone] Zone in which the pool's nodes will be spawned - [root-volume-type] Defines the system volume disk type. Two different types of volume (`volume_type`) are provided: `l_ssd` is a local block storage which means your system is stored locally on your node's hypervisor. `b_ssd` is a remote block storage which means your system is stored on a centralized and resilient cluster (default_volume_type | l_ssd | b_ssd | sbs_5k | sbs_15k) + [root-volume-type] Defines the system volume disk type. Several types of volume (`volume_type`) are provided: (default_volume_type | l_ssd | b_ssd | sbs_5k | sbs_15k) [root-volume-size] System volume disk size [public-ip-disabled] Defines if the public IP should be removed from Nodes. To use this feature, your Cluster must have an attached Private Network set up with a Public Gateway [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/cmd/scw/testdata/test-all-usage-k8s-pool-delete-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-pool-delete-usage.golden index 8ec219a71d..587e8a4304 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-pool-delete-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-pool-delete-usage.golden @@ -7,7 +7,7 @@ USAGE: EXAMPLES: Delete a specific pool - scw k8s pool delete 11111111-1111-1111-111111111111 + scw k8s pool delete 11111111-1111-1111-1111-111111111111 ARGS: pool-id ID of the pool to delete diff --git a/cmd/scw/testdata/test-all-usage-k8s-pool-get-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-pool-get-usage.golden index 2cf3f55710..a2a44c48ba 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-pool-get-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-pool-get-usage.golden @@ -7,7 +7,7 @@ USAGE: EXAMPLES: Get a given pool - scw k8s pool get 11111111-1111-1111-111111111111 + scw k8s pool get 11111111-1111-1111-1111-111111111111 ARGS: pool-id ID of the requested pool 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 d692e87550..0038571ec6 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 cluster - scw k8s pool list cluster-id=11111111-1111-1111-111111111111 + scw k8s pool list cluster-id=11111111-1111-1111-1111-111111111111 List all scaling pools for a cluster - scw k8s pool list cluster-id=11111111-1111-1111-111111111111 status=scaling + scw k8s pool list cluster-id=11111111-1111-1111-1111-111111111111 status=scaling List all pools for clusters containing 'foo' in their name - scw k8s pool list cluster-id=11111111-1111-1111-111111111111 name=foo + scw k8s pool list cluster-id=11111111-1111-1111-1111-111111111111 name=foo List all pools for a cluster and order them by ascending creation date - scw k8s pool list cluster-id=11111111-1111-1111-111111111111 order-by=created_at_asc + scw k8s pool list cluster-id=11111111-1111-1111-1111-111111111111 order-by=created_at_asc ARGS: cluster-id ID of the cluster whose pools will be listed diff --git a/cmd/scw/testdata/test-all-usage-k8s-pool-update-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-pool-update-usage.golden index ca962b9636..50e5972997 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-pool-update-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-pool-update-usage.golden @@ -1,19 +1,22 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Update the attributes of a specific pool, such as its desired size, autoscaling settings, and tags. +Update the attributes of a specific pool, such as its desired size, autoscaling settings, and tags. To upgrade a pool, you will need to use the dedicated endpoint. USAGE: scw k8s pool update [arg=value ...] EXAMPLES: Enable autoscaling on a given pool - scw k8s pool update 11111111-1111-1111-111111111111 autoscaling=true + scw k8s pool update 11111111-1111-1111-1111-111111111111 autoscaling=true Reduce the size and maximum size of a given pool to 4 - scw k8s pool update 11111111-1111-1111-111111111111 size=4 max-size=4 + scw k8s pool update 11111111-1111-1111-1111-111111111111 size=4 max-size=4 Modify the tags of a given pool - scw k8s pool update 11111111-1111-1111-111111111111 tags.0=my tags.1=new tags.2=pool + scw k8s pool update 11111111-1111-1111-1111-111111111111 tags.0=my tags.1=new tags.2=pool + + Remove all tags of a given pool + scw k8s pool update 11111111-1111-1111-1111-111111111111 tags=none ARGS: pool-id ID of the pool to update diff --git a/cmd/scw/testdata/test-all-usage-k8s-pool-upgrade-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-pool-upgrade-usage.golden index 83d6546d41..217b7afc52 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-pool-upgrade-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-pool-upgrade-usage.golden @@ -1,13 +1,14 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ Upgrade the Kubernetes version of a specific pool. Note that it only works if the targeted version matches the cluster's version. +This will drain and replace the nodes in that pool. USAGE: scw k8s pool upgrade [arg=value ...] EXAMPLES: - Upgrade a specific pool to the Kubernetes version 1.27.0 - scw k8s pool upgrade 11111111-1111-1111-111111111111 version=1.27.0 + Upgrade a specific pool to the Kubernetes version 1.31.2 + scw k8s pool upgrade 11111111-1111-1111-1111-111111111111 version=1.31.2 ARGS: pool-id ID of the pool to upgrade diff --git a/cmd/scw/testdata/test-all-usage-k8s-pool-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-pool-usage.golden index 52b8d36cc9..1a43312401 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-pool-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-pool-usage.golden @@ -1,7 +1,7 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ A pool is a set of identical nodes -A pool has a name, a size (its desired number of nodes), node number limits (min, max), and a Scaleway Instance type. Changing those limits increases/decreases the size of a pool. As a result and depending on its load, the pool will grow or shrink within those limits when autoscaling is enabled. A "default pool" is automatically created with every cluster via the console. +A pool has a name, a size (its desired number of nodes), node number limits (min, max), and a Scaleway Instance type. Changing those limits increases/decreases the size of a pool. As a result and depending on its load, the pool will grow or shrink within those limits when autoscaling is enabled. USAGE: scw k8s pool diff --git a/cmd/scw/testdata/test-all-usage-k8s-version-get-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-version-get-usage.golden index bf48433848..69616347d3 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-version-get-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-version-get-usage.golden @@ -6,8 +6,8 @@ USAGE: scw k8s version get [arg=value ...] EXAMPLES: - Get the Kubernetes version 1.27.0 - scw k8s version get 1.27.0 + Get the Kubernetes version 1.31.2 + scw k8s version get 1.31.2 ARGS: version-name Requested version name diff --git a/docs/commands/k8s.md b/docs/commands/k8s.md index 580e09aeb0..4328ecd184 100644 --- a/docs/commands/k8s.md +++ b/docs/commands/k8s.md @@ -159,7 +159,7 @@ scw k8s cluster create [arg=value ...] | Name | | Description | |------|---|-------------| | project-id | | Project ID to use. If none is passed the default project ID will be used | -| type | | Type of the cluster (possible values are kapsule, multicloud, kapsule-dedicated-8, kapsule-dedicated-16) | +| type | | Type of the cluster. See [list available cluster types](#list-available-cluster-types-for-a-cluster) for a list of valid types | | name | Required
Default: `` | Cluster name | | description | | Cluster description | | tags.{index} | | Tags associated with the cluster | @@ -167,23 +167,23 @@ scw k8s cluster create [arg=value ...] | cni | Required
Default: `cilium`
One of: `unknown_cni`, `cilium`, `calico`, `weave`, `flannel`, `kilo`, `none` | Container Network Interface (CNI) plugin running in the cluster | | pools.{index}.name | | Name of the pool | | pools.{index}.node-type | | Node type is the type of Scaleway Instance wanted for the pool. Nodes with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST). 'external' is a special node type used to provision instances from other cloud providers in a Kosmos Cluster | -| pools.{index}.placement-group-id | | Placement group ID in which all the nodes of the pool will be created | +| pools.{index}.placement-group-id | | Placement group ID in which all the nodes of the pool will be created, placement groups are limited to 20 instances. | | pools.{index}.autoscaling | | Defines whether the autoscaling feature is enabled for the pool | | pools.{index}.size | | Size (number of nodes) of the pool | | pools.{index}.min-size | | Defines the minimum size of the pool. Note that this field is only used when autoscaling is enabled on the pool | | pools.{index}.max-size | | Defines the maximum size of the pool. Note that this field is only used when autoscaling is enabled on the pool | -| pools.{index}.container-runtime | One of: `unknown_runtime`, `docker`, `containerd`, `crio` | Customization of the container runtime is available for each pool. Note that `docker` has been deprecated since version 1.20 and will be removed by version 1.24 | +| pools.{index}.container-runtime | One of: `unknown_runtime`, `docker`, `containerd`, `crio` | Customization of the container runtime is available for each pool | | pools.{index}.autohealing | | Defines whether the autohealing feature is enabled for the pool | -| pools.{index}.tags.{index} | | Tags associated with the pool | +| pools.{index}.tags.{index} | | Tags associated with the pool, see [managing tags](https://www.scaleway.com/en/docs/containers/kubernetes/api-cli/managing-tags) | | pools.{index}.kubelet-args.{key} | | Kubelet arguments to be used by this pool. Note that this feature is experimental | | pools.{index}.upgrade-policy.max-unavailable | | The maximum number of nodes that can be not ready at the same time | | pools.{index}.upgrade-policy.max-surge | | The maximum number of nodes to be created during the upgrade | | pools.{index}.zone | | Zone in which the pool's nodes will be spawned | -| pools.{index}.root-volume-type | One of: `default_volume_type`, `l_ssd`, `b_ssd`, `sbs_5k`, `sbs_15k` | Defines the system volume disk type. Two different types of volume (`volume_type`) are provided: `l_ssd` is a local block storage which means your system is stored locally on your node's hypervisor. `b_ssd` is a remote block storage which means your system is stored on a centralized and resilient cluster | +| pools.{index}.root-volume-type | One of: `default_volume_type`, `l_ssd`, `b_ssd`, `sbs_5k`, `sbs_15k` | Defines the system volume disk type. Several types of volume (`volume_type`) are provided: | | pools.{index}.root-volume-size | | System volume disk size | | pools.{index}.public-ip-disabled | | Defines if the public IP should be removed from Nodes. To use this feature, your Cluster must have an attached Private Network set up with a Public Gateway | | autoscaler-config.scale-down-disabled | | Disable the cluster autoscaler | -| autoscaler-config.scale-down-delay-after-add | | How long after scale up that scale down evaluation resumes | +| autoscaler-config.scale-down-delay-after-add | | How long after scale up the scale down evaluation resumes | | autoscaler-config.estimator | One of: `unknown_estimator`, `binpacking` | Type of resource estimator to be used in scale up | | autoscaler-config.expander | One of: `unknown_expander`, `random`, `most_pods`, `least_waste`, `priority`, `price` | Type of node group expander to be used in scale up | | autoscaler-config.ignore-daemonsets-utilization | | Ignore DaemonSet pods when calculating resource utilization for scaling down | @@ -213,14 +213,14 @@ scw k8s cluster create [arg=value ...] **Examples:** -Create a Kubernetes cluster named foo with cilium as CNI, in version 1.27.0 and with a pool named default composed of 3 DEV1-M +Create a Kubernetes cluster named foo with cilium as CNI, in version 1.31.2 and with a pool named default composed of 3 DEV1-M ``` -scw k8s cluster create name=foo version=1.27.0 pools.0.size=3 pools.0.node-type=DEV1-M pools.0.name=default +scw k8s cluster create name=foo version=1.31.2 pools.0.size=3 pools.0.node-type=DEV1-M pools.0.name=default ``` -Create a Kubernetes cluster named bar, tagged, calico as CNI, in version 1.27.0 and with a tagged pool named default composed of 2 RENDER-S and autohealing and autoscaling enabled (between 1 and 10 nodes) +Create a Kubernetes cluster named bar, tagged, calico as CNI, in version 1.31.2 and with a tagged pool named default composed of 2 RENDER-S and autohealing and autoscaling enabled (between 1 and 10 nodes) ``` -scw k8s cluster create name=bar version=1.27.0 tags.0=tag1 tags.1=tag2 cni=calico pools.0.size=2 pools.0.node-type=RENDER-S pools.0.min-size=1 pools.0.max-size=10 pools.0.autohealing=true pools.0.autoscaling=true pools.0.tags.0=pooltag1 pools.0.tags.1=pooltag2 pools.0.name=default +scw k8s cluster create name=bar version=1.31.2 tags.0=tag1 tags.1=tag2 cni=calico pools.0.size=2 pools.0.node-type=RENDER-S pools.0.min-size=1 pools.0.max-size=10 pools.0.autohealing=true pools.0.autoscaling=true pools.0.tags.0=pooltag1 pools.0.tags.1=pooltag2 pools.0.name=default ``` @@ -228,7 +228,7 @@ scw k8s cluster create name=bar version=1.27.0 tags.0=tag1 tags.1=tag2 cni=calic ### Delete a Cluster -Delete a specific Kubernetes cluster and all its associated pools and nodes. Note that this method will not delete any Load Balancer or Block Volume that are associated with the cluster. +Delete a specific Kubernetes cluster and all its associated pools and nodes, and possibly its associated Load Balancers or Block Volumes. **Usage:** @@ -249,14 +249,14 @@ scw k8s cluster delete [arg=value ...] **Examples:** -Delete a cluster +Delete a cluster without deleting its Block volumes and Load Balancers ``` -scw k8s cluster delete 11111111-1111-1111-111111111111 +scw k8s cluster delete 11111111-1111-1111-1111-111111111111 ``` -Delete a cluster with its Block volumes and Load Balancers +Delete a cluster with its Block volumes and Load Balancers (best effort) ``` -scw k8s cluster delete 11111111-1111-1111-111111111111 with-additional-resources=true +scw k8s cluster delete 11111111-1111-1111-1111-111111111111 with-additional-resources=true ``` @@ -286,7 +286,7 @@ scw k8s cluster get [arg=value ...] Get a cluster information ``` -scw k8s cluster get 11111111-1111-1111-111111111111 +scw k8s cluster get 11111111-1111-1111-1111-111111111111 ``` @@ -362,7 +362,7 @@ scw k8s cluster list-available-types [arg=value ...] List all cluster types that a cluster can upgrade to ``` -scw k8s cluster list-available-types 11111111-1111-1111-111111111111 +scw k8s cluster list-available-types 11111111-1111-1111-1111-111111111111 ``` @@ -392,7 +392,7 @@ scw k8s cluster list-available-versions [arg=value ...] List all versions that a cluster can upgrade to ``` -scw k8s cluster list-available-versions 11111111-1111-1111-111111111111 +scw k8s cluster list-available-versions 11111111-1111-1111-1111-111111111111 ``` @@ -401,6 +401,7 @@ scw k8s cluster list-available-versions 11111111-1111-1111-111111111111 ### Migrate a cluster to SBS CSI Enable the latest CSI compatible with Scaleway Block Storage (SBS) and migrate all existing PersistentVolumes/VolumeSnapshotContents to SBS. +Make sure to have the necessary Quota before running this command. **Usage:** @@ -422,7 +423,7 @@ scw k8s cluster migrate-to-sbs-csi [arg=value ...] Migrate a cluster to SBS CSI ``` -scw k8s cluster migrate-to-sbs-csi 11111111-1111-1111-111111111111 +scw k8s cluster migrate-to-sbs-csi 11111111-1111-1111-1111-111111111111 ``` @@ -430,7 +431,7 @@ scw k8s cluster migrate-to-sbs-csi 11111111-1111-1111-111111111111 ### Reset the admin token of a Cluster -Reset the admin token for a specific Kubernetes cluster. This will revoke the old admin token (which will not be usable afterwards) and create a new one. Note that you will need to download kubeconfig again to keep interacting with the cluster. +Reset the admin token for a specific Kubernetes cluster. This will revoke the old admin token (which will not be usable afterwards) and create a new one. Note that you will need to download the kubeconfig again to keep interacting with the cluster. **Usage:** @@ -452,7 +453,7 @@ scw k8s cluster reset-admin-token [arg=value ...] Reset the admin token for a cluster ``` -scw k8s cluster reset-admin-token 11111111-1111-1111-111111111111 +scw k8s cluster reset-admin-token 11111111-1111-1111-1111-111111111111 ``` @@ -460,7 +461,7 @@ scw k8s cluster reset-admin-token 11111111-1111-1111-111111111111 ### Change the Cluster type -Change the type of a specific Kubernetes cluster. To see the possible values you can enter for the `type` field, [list available cluster types](#path-clusters-list-available-cluster-types-for-a-cluster). +Change the type of a specific Kubernetes cluster. To see the possible values you can enter for the `type` field, [list available cluster types](#list-available-cluster-types-for-a-cluster). **Usage:** @@ -483,7 +484,7 @@ scw k8s cluster set-type [arg=value ...] Convert a kapsule cluster to a kapsule-dedicated-16 cluster ``` -scw k8s cluster set-type 11111111-1111-1111-111111111111 type=kapsule-dedicated-16 +scw k8s cluster set-type 11111111-1111-1111-1111-111111111111 type=kapsule-dedicated-16 ``` @@ -509,7 +510,7 @@ scw k8s cluster update [arg=value ...] | description | | New description for the cluster | | tags.{index} | | New tags associated with the cluster | | autoscaler-config.scale-down-disabled | | Disable the cluster autoscaler | -| autoscaler-config.scale-down-delay-after-add | | How long after scale up that scale down evaluation resumes | +| autoscaler-config.scale-down-delay-after-add | | How long after scale up the scale down evaluation resumes | | autoscaler-config.estimator | One of: `unknown_estimator`, `binpacking` | Type of resource estimator to be used in scale up | | autoscaler-config.expander | One of: `unknown_expander`, `random`, `most_pods`, `least_waste`, `priority`, `price` | Type of node group expander to be used in scale up | | autoscaler-config.ignore-daemonsets-utilization | | Ignore DaemonSet pods when calculating resource utilization for scaling down | @@ -537,9 +538,14 @@ scw k8s cluster update [arg=value ...] **Examples:** -Add TTLAfterFinished and ServiceNodeExclusion as feature gates on a cluster +Add InPlacePodVerticalScaling and SidecarContainers as feature gates on a cluster ``` -scw k8s cluster update 11111111-1111-1111-111111111111 feature-gates.0=TTLAfterFinished feature-gates.1=ServiceNodeExclusion +scw k8s cluster update 11111111-1111-1111-1111-111111111111 feature-gates.0=InPlacePodVerticalScaling feature-gates.1=SidecarContainers +``` + +Remove all custom feature gates on a cluster +``` +scw k8s cluster update 11111111-1111-1111-1111-111111111111 feature-gates=none ``` @@ -569,14 +575,14 @@ scw k8s cluster upgrade [arg=value ...] **Examples:** -Upgrade a cluster version 1.27.0 of Kubernetes (pools *are not* included) +Upgrade a cluster to version 1.31.2 of Kubernetes (pools *are not* included) ``` -scw k8s cluster upgrade 11111111-1111-1111-111111111111 version=1.27.0 +scw k8s cluster upgrade 11111111-1111-1111-1111-111111111111 version=1.31.2 ``` -Upgrade a cluster to version 1.27.0 of Kubernetes (pools *are* included) +Upgrade a cluster to version 1.31.2 of Kubernetes (pools *are* included) ``` -scw k8s cluster upgrade 11111111-1111-1111-111111111111 version=1.27.0 upgrade-pools=true +scw k8s cluster upgrade 11111111-1111-1111-1111-111111111111 version=1.31.2 upgrade-pools=true ``` @@ -744,7 +750,7 @@ A node is always part of a pool. Each of them has the Kubernetes software automa ### Delete a Node in a Cluster -Delete a specific Node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster), disruption of your applications can be expected. +Delete a specific Node. The node will first be drained and pods will be rescheduled onto another node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster, or with specific constraints), disruption of your applications may occur. **Usage:** @@ -768,17 +774,17 @@ scw k8s node delete [arg=value ...] Delete a node ``` -scw k8s node delete 11111111-1111-1111-111111111111 +scw k8s node delete 11111111-1111-1111-1111-111111111111 ``` Delete a node without evicting workloads ``` -scw k8s node delete 11111111-1111-1111-111111111111 skip-drain=true +scw k8s node delete 11111111-1111-1111-1111-111111111111 skip-drain=true ``` Replace a node by a new one ``` -scw k8s node delete 11111111-1111-1111-111111111111 replace=true +scw k8s node delete 11111111-1111-1111-1111-111111111111 replace=true ``` @@ -808,7 +814,7 @@ scw k8s node get [arg=value ...] Get a node ``` -scw k8s node get 11111111-1111-1111-111111111111 +scw k8s node get 11111111-1111-1111-1111-111111111111 ``` @@ -842,17 +848,17 @@ scw k8s node list [arg=value ...] List all the nodes in the cluster ``` -scw k8s node list cluster-id=11111111-1111-1111-111111111111 +scw k8s node list cluster-id=11111111-1111-1111-1111-111111111111 ``` -List all the nodes in the cluster's 2222222222222-2222-222222222222 pool +List all the nodes in the cluster's 22222222-2222-2222-2222-222222222222 pool ``` -scw k8s node list cluster-id=11111111-1111-1111-111111111111 pool-id=2222222222222-2222-222222222222 +scw k8s node list cluster-id=11111111-1111-1111-1111-111111111111 pool-id=22222222-2222-2222-2222-222222222222 ``` List all cluster nodes that are ready ``` -scw k8s node list cluster-id=11111111-1111-1111-111111111111 status=ready +scw k8s node list cluster-id=11111111-1111-1111-1111-111111111111 status=ready ``` @@ -860,7 +866,7 @@ scw k8s node list cluster-id=11111111-1111-1111-111111111111 status=ready ### Reboot a Node in a Cluster -Reboot a specific Node. The node will first be cordoned (scheduling will be disabled on it). The existing pods on the node will then be drained and rescheduled onto another schedulable node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster), disruption of your applications can be expected. +Reboot a specific Node. The node will first be drained and pods will be rescheduled onto another node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster, or with specific constraints), disruption of your applications may occur. **Usage:** @@ -882,7 +888,7 @@ scw k8s node reboot [arg=value ...] Reboot a node ``` -scw k8s node reboot 11111111-1111-1111-111111111111 +scw k8s node reboot 11111111-1111-1111-1111-111111111111 ``` @@ -890,7 +896,7 @@ scw k8s node reboot 11111111-1111-1111-111111111111 ### Replace a Node in a Cluster -Replace a specific Node. The node will first be cordoned (scheduling will be disabled on it). The existing pods on the node will then be drained and rescheduled onto another schedulable node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster), disruption of your applications can be expected. +Replace a specific Node. The node will first be drained and pods will be rescheduled onto another node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster, or with specific constraints), disruption of your applications may occur. **Usage:** @@ -912,7 +918,7 @@ scw k8s node replace [arg=value ...] Replace a node ``` -scw k8s node replace 11111111-1111-1111-111111111111 +scw k8s node replace 11111111-1111-1111-1111-111111111111 ``` @@ -952,7 +958,7 @@ scw k8s node wait 11111111-1111-1111-1111-111111111111 ## Kapsule pool management commands A pool is a set of identical nodes -A pool has a name, a size (its desired number of nodes), node number limits (min, max), and a Scaleway Instance type. Changing those limits increases/decreases the size of a pool. As a result and depending on its load, the pool will grow or shrink within those limits when autoscaling is enabled. A "default pool" is automatically created with every cluster via the console. +A pool has a name, a size (its desired number of nodes), node number limits (min, max), and a Scaleway Instance type. Changing those limits increases/decreases the size of a pool. As a result and depending on its load, the pool will grow or shrink within those limits when autoscaling is enabled. ### Create a new Pool in a Cluster @@ -973,19 +979,19 @@ scw k8s pool create [arg=value ...] | cluster-id | Required | Cluster ID to which the pool will be attached | | name | Required
Default: `` | Pool name | | node-type | Required
Default: `DEV1-M` | Node type is the type of Scaleway Instance wanted for the pool. Nodes with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST). 'external' is a special node type used to provision instances from other cloud providers in a Kosmos Cluster | -| placement-group-id | | Placement group ID in which all the nodes of the pool will be created | +| placement-group-id | | Placement group ID in which all the nodes of the pool will be created, placement groups are limited to 20 instances. | | autoscaling | | Defines whether the autoscaling feature is enabled for the pool | | size | Required
Default: `1` | Size (number of nodes) of the pool | | min-size | | Defines the minimum size of the pool. Note that this field is only used when autoscaling is enabled on the pool | | max-size | | Defines the maximum size of the pool. Note that this field is only used when autoscaling is enabled on the pool | -| container-runtime | One of: `unknown_runtime`, `docker`, `containerd`, `crio` | Customization of the container runtime is available for each pool. Note that `docker` has been deprecated since version 1.20 and will be removed by version 1.24 | +| container-runtime | One of: `unknown_runtime`, `docker`, `containerd`, `crio` | Customization of the container runtime is available for each pool | | autohealing | | Defines whether the autohealing feature is enabled for the pool | -| tags.{index} | | Tags associated with the pool | +| tags.{index} | | Tags associated with the pool, see [managing tags](https://www.scaleway.com/en/docs/containers/kubernetes/api-cli/managing-tags) | | kubelet-args.{key} | | Kubelet arguments to be used by this pool. Note that this feature is experimental | | upgrade-policy.max-unavailable | | | | upgrade-policy.max-surge | | | | zone | | Zone in which the pool's nodes will be spawned | -| root-volume-type | One of: `default_volume_type`, `l_ssd`, `b_ssd`, `sbs_5k`, `sbs_15k` | Defines the system volume disk type. Two different types of volume (`volume_type`) are provided: `l_ssd` is a local block storage which means your system is stored locally on your node's hypervisor. `b_ssd` is a remote block storage which means your system is stored on a centralized and resilient cluster | +| root-volume-type | One of: `default_volume_type`, `l_ssd`, `b_ssd`, `sbs_5k`, `sbs_15k` | Defines the system volume disk type. Several types of volume (`volume_type`) are provided: | | root-volume-size | | System volume disk size | | public-ip-disabled | | Defines if the public IP should be removed from Nodes. To use this feature, your Cluster must have an attached Private Network set up with a Public Gateway | | 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 | @@ -996,17 +1002,17 @@ scw k8s pool create [arg=value ...] Create a pool named 'bar' with 2 DEV1-XL on a cluster ``` -scw k8s pool create cluster-id=11111111-1111-1111-111111111111 name=bar node-type=DEV1-XL size=2 +scw k8s pool create cluster-id=11111111-1111-1111-1111-111111111111 name=bar node-type=DEV1-XL size=2 ``` -Create a pool named 'fish' with 5 GP1-L, autoscaling within 0 and 10 nodes and autohealing enabled, and containerd as the cluster container runtime +Create a pool named 'fish' with 5 GP1-L, autoscaling within 0 and 10 nodes and autohealing enabled ``` -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 +scw k8s pool create cluster-id=11111111-1111-1111-1111-111111111111 name=fish node-type=GP1-L size=5 min-size=0 max-size=10 autoscaling=true autohealing=true ``` -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 cluster +Create a tagged pool named 'turtle' with 1 GP1-S which is using the already created placement group 22222222-2222-2222-2222-222222222222 for all the nodes in the pool on a cluster ``` -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 +scw k8s pool create cluster-id=11111111-1111-1111-1111-111111111111 name=turtle node-type=GP1-S size=1 placement-group-id=22222222-2222-2222-2222-222222222222 tags.0=turtle-uses-placement-group ``` @@ -1036,7 +1042,7 @@ scw k8s pool delete [arg=value ...] Delete a specific pool ``` -scw k8s pool delete 11111111-1111-1111-111111111111 +scw k8s pool delete 11111111-1111-1111-1111-111111111111 ``` @@ -1066,7 +1072,7 @@ scw k8s pool get [arg=value ...] Get a given pool ``` -scw k8s pool get 11111111-1111-1111-111111111111 +scw k8s pool get 11111111-1111-1111-1111-111111111111 ``` @@ -1099,22 +1105,22 @@ scw k8s pool list [arg=value ...] List all pools for a cluster ``` -scw k8s pool list cluster-id=11111111-1111-1111-111111111111 +scw k8s pool list cluster-id=11111111-1111-1111-1111-111111111111 ``` List all scaling pools for a cluster ``` -scw k8s pool list cluster-id=11111111-1111-1111-111111111111 status=scaling +scw k8s pool list cluster-id=11111111-1111-1111-1111-111111111111 status=scaling ``` List all pools for clusters containing 'foo' in their name ``` -scw k8s pool list cluster-id=11111111-1111-1111-111111111111 name=foo +scw k8s pool list cluster-id=11111111-1111-1111-1111-111111111111 name=foo ``` List all pools for a cluster and order them by ascending creation date ``` -scw k8s pool list cluster-id=11111111-1111-1111-111111111111 order-by=created_at_asc +scw k8s pool list cluster-id=11111111-1111-1111-1111-111111111111 order-by=created_at_asc ``` @@ -1122,7 +1128,7 @@ scw k8s pool list cluster-id=11111111-1111-1111-111111111111 order-by=created_at ### Update a Pool in a Cluster -Update the attributes of a specific pool, such as its desired size, autoscaling settings, and tags. +Update the attributes of a specific pool, such as its desired size, autoscaling settings, and tags. To upgrade a pool, you will need to use the dedicated endpoint. **Usage:** @@ -1153,17 +1159,22 @@ scw k8s pool update [arg=value ...] Enable autoscaling on a given pool ``` -scw k8s pool update 11111111-1111-1111-111111111111 autoscaling=true +scw k8s pool update 11111111-1111-1111-1111-111111111111 autoscaling=true ``` Reduce the size and maximum size of a given pool to 4 ``` -scw k8s pool update 11111111-1111-1111-111111111111 size=4 max-size=4 +scw k8s pool update 11111111-1111-1111-1111-111111111111 size=4 max-size=4 ``` Modify the tags of a given pool ``` -scw k8s pool update 11111111-1111-1111-111111111111 tags.0=my tags.1=new tags.2=pool +scw k8s pool update 11111111-1111-1111-1111-111111111111 tags.0=my tags.1=new tags.2=pool +``` + +Remove all tags of a given pool +``` +scw k8s pool update 11111111-1111-1111-1111-111111111111 tags=none ``` @@ -1172,6 +1183,7 @@ scw k8s pool update 11111111-1111-1111-111111111111 tags.0=my tags.1=new tags.2= ### Upgrade a Pool in a Cluster Upgrade the Kubernetes version of a specific pool. Note that it only works if the targeted version matches the cluster's version. +This will drain and replace the nodes in that pool. **Usage:** @@ -1192,9 +1204,9 @@ scw k8s pool upgrade [arg=value ...] **Examples:** -Upgrade a specific pool to the Kubernetes version 1.27.0 +Upgrade a specific pool to the Kubernetes version 1.31.2 ``` -scw k8s pool upgrade 11111111-1111-1111-111111111111 version=1.27.0 +scw k8s pool upgrade 11111111-1111-1111-1111-111111111111 version=1.31.2 ``` @@ -1259,9 +1271,9 @@ scw k8s version get [arg=value ...] **Examples:** -Get the Kubernetes version 1.27.0 +Get the Kubernetes version 1.31.2 ``` -scw k8s version get 1.27.0 +scw k8s version get 1.31.2 ``` diff --git a/go.mod b/go.mod index b9789f12c8..f67251a8d9 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/mattn/go-isatty v0.0.20 github.com/moby/buildkit v0.13.2 github.com/opencontainers/go-digest v1.0.0 - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241224153503-37a05773a198 + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241226101018-6140d56d1e5c github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 diff --git a/go.sum b/go.sum index 07438a14f5..bc61e11311 100644 --- a/go.sum +++ b/go.sum @@ -466,8 +466,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241224153503-37a05773a198 h1:ym2tXsg7ZCAnZlKmB07jMApvvi5TE66lXWH6xRZTsFE= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241224153503-37a05773a198/go.mod h1:kzh+BSAvpoyHHdHBCDhmSWtBc1NbLMZ2lWHqnBoxFks= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241226101018-6140d56d1e5c h1:GvJhbvUDbkkz8ts+hmLhv9SPgj/DLaH+Qj7rbxV+jkw= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241226101018-6140d56d1e5c/go.mod h1:kzh+BSAvpoyHHdHBCDhmSWtBc1NbLMZ2lWHqnBoxFks= github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8= github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM= github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA= diff --git a/internal/namespaces/k8s/v1/k8s_cli.go b/internal/namespaces/k8s/v1/k8s_cli.go index fb008d0c5b..bbe76cd88c 100644 --- a/internal/namespaces/k8s/v1/k8s_cli.go +++ b/internal/namespaces/k8s/v1/k8s_cli.go @@ -79,7 +79,7 @@ func k8sPool() *core.Command { return &core.Command{ Short: `Kapsule pool management commands`, Long: `A pool is a set of identical nodes -A pool has a name, a size (its desired number of nodes), node number limits (min, max), and a Scaleway Instance type. Changing those limits increases/decreases the size of a pool. As a result and depending on its load, the pool will grow or shrink within those limits when autoscaling is enabled. A "default pool" is automatically created with every cluster via the console.`, +A pool has a name, a size (its desired number of nodes), node number limits (min, max), and a Scaleway Instance type. Changing those limits increases/decreases the size of a pool. As a result and depending on its load, the pool will grow or shrink within those limits when autoscaling is enabled.`, Namespace: "k8s", Resource: "pool", } @@ -226,28 +226,25 @@ func k8sClusterList() *core.Command { FieldName: "Name", }, { - FieldName: "Status", - }, - { - FieldName: "Version", + FieldName: "Type", }, { - FieldName: "Region", + FieldName: "Cni", }, { - FieldName: "ProjectID", + FieldName: "Version", }, { - FieldName: "Tags", + FieldName: "Region", }, { - FieldName: "Cni", + FieldName: "Status", }, { - FieldName: "Description", + FieldName: "ProjectID", }, { - FieldName: "ClusterURL", + FieldName: "Tags", }, { FieldName: "CreatedAt", @@ -256,7 +253,7 @@ func k8sClusterList() *core.Command { FieldName: "UpdatedAt", }, { - FieldName: "Type", + FieldName: "Description", }, }}, } @@ -275,7 +272,7 @@ func k8sClusterCreate() *core.Command { core.ProjectIDArgSpec(), { Name: "type", - Short: `Type of the cluster (possible values are kapsule, multicloud, kapsule-dedicated-8, kapsule-dedicated-16)`, + Short: `Type of the cluster. See [list available cluster types](#list-available-cluster-types-for-a-cluster) for a list of valid types`, Required: false, Deprecated: false, Positional: false, @@ -333,7 +330,7 @@ func k8sClusterCreate() *core.Command { }, { Name: "pools.{index}.placement-group-id", - Short: `Placement group ID in which all the nodes of the pool will be created`, + Short: `Placement group ID in which all the nodes of the pool will be created, placement groups are limited to 20 instances.`, Required: false, Deprecated: false, Positional: false, @@ -368,7 +365,7 @@ func k8sClusterCreate() *core.Command { }, { Name: "pools.{index}.container-runtime", - Short: `Customization of the container runtime is available for each pool. Note that ` + "`" + `docker` + "`" + ` has been deprecated since version 1.20 and will be removed by version 1.24`, + Short: `Customization of the container runtime is available for each pool`, Required: false, Deprecated: false, Positional: false, @@ -383,7 +380,7 @@ func k8sClusterCreate() *core.Command { }, { Name: "pools.{index}.tags.{index}", - Short: `Tags associated with the pool`, + Short: `Tags associated with the pool, see [managing tags](https://www.scaleway.com/en/docs/containers/kubernetes/api-cli/managing-tags)`, Required: false, Deprecated: false, Positional: false, @@ -418,7 +415,7 @@ func k8sClusterCreate() *core.Command { }, { Name: "pools.{index}.root-volume-type", - Short: `Defines the system volume disk type. Two different types of volume (` + "`" + `volume_type` + "`" + `) are provided: ` + "`" + `l_ssd` + "`" + ` is a local block storage which means your system is stored locally on your node's hypervisor. ` + "`" + `b_ssd` + "`" + ` is a remote block storage which means your system is stored on a centralized and resilient cluster`, + Short: `Defines the system volume disk type. Several types of volume (` + "`" + `volume_type` + "`" + `) are provided:`, Required: false, Deprecated: false, Positional: false, @@ -447,7 +444,7 @@ func k8sClusterCreate() *core.Command { }, { Name: "autoscaler-config.scale-down-delay-after-add", - Short: `How long after scale up that scale down evaluation resumes`, + Short: `How long after scale up the scale down evaluation resumes`, Required: false, Deprecated: false, Positional: false, @@ -622,12 +619,12 @@ func k8sClusterCreate() *core.Command { }, Examples: []*core.Example{ { - Short: "Create a Kubernetes cluster named foo with cilium as CNI, in version 1.27.0 and with a pool named default composed of 3 DEV1-M", - Raw: `scw k8s cluster create name=foo version=1.27.0 pools.0.size=3 pools.0.node-type=DEV1-M pools.0.name=default`, + Short: "Create a Kubernetes cluster named foo with cilium as CNI, in version 1.31.2 and with a pool named default composed of 3 DEV1-M", + Raw: `scw k8s cluster create name=foo version=1.31.2 pools.0.size=3 pools.0.node-type=DEV1-M pools.0.name=default`, }, { - Short: "Create a Kubernetes cluster named bar, tagged, calico as CNI, in version 1.27.0 and with a tagged pool named default composed of 2 RENDER-S and autohealing and autoscaling enabled (between 1 and 10 nodes)", - Raw: `scw k8s cluster create name=bar version=1.27.0 tags.0=tag1 tags.1=tag2 cni=calico pools.0.size=2 pools.0.node-type=RENDER-S pools.0.min-size=1 pools.0.max-size=10 pools.0.autohealing=true pools.0.autoscaling=true pools.0.tags.0=pooltag1 pools.0.tags.1=pooltag2 pools.0.name=default`, + Short: "Create a Kubernetes cluster named bar, tagged, calico as CNI, in version 1.31.2 and with a tagged pool named default composed of 2 RENDER-S and autohealing and autoscaling enabled (between 1 and 10 nodes)", + Raw: `scw k8s cluster create name=bar version=1.31.2 tags.0=tag1 tags.1=tag2 cni=calico pools.0.size=2 pools.0.node-type=RENDER-S pools.0.min-size=1 pools.0.max-size=10 pools.0.autohealing=true pools.0.autoscaling=true pools.0.tags.0=pooltag1 pools.0.tags.1=pooltag2 pools.0.name=default`, }, }, } @@ -663,7 +660,7 @@ func k8sClusterGet() *core.Command { Examples: []*core.Example{ { Short: "Get a cluster information", - Raw: `scw k8s cluster get 11111111-1111-1111-111111111111`, + Raw: `scw k8s cluster get 11111111-1111-1111-1111-111111111111`, }, }, } @@ -716,7 +713,7 @@ func k8sClusterUpdate() *core.Command { }, { Name: "autoscaler-config.scale-down-delay-after-add", - Short: `How long after scale up that scale down evaluation resumes`, + Short: `How long after scale up the scale down evaluation resumes`, Required: false, Deprecated: false, Positional: false, @@ -883,8 +880,12 @@ func k8sClusterUpdate() *core.Command { }, Examples: []*core.Example{ { - Short: "Add TTLAfterFinished and ServiceNodeExclusion as feature gates on a cluster", - Raw: `scw k8s cluster update 11111111-1111-1111-111111111111 feature-gates.0=TTLAfterFinished feature-gates.1=ServiceNodeExclusion`, + Short: "Add InPlacePodVerticalScaling and SidecarContainers as feature gates on a cluster", + Raw: `scw k8s cluster update 11111111-1111-1111-1111-111111111111 feature-gates.0=InPlacePodVerticalScaling feature-gates.1=SidecarContainers`, + }, + { + Short: "Remove all custom feature gates on a cluster", + Raw: `scw k8s cluster update 11111111-1111-1111-1111-111111111111 feature-gates=none`, }, }, } @@ -893,7 +894,7 @@ func k8sClusterUpdate() *core.Command { func k8sClusterDelete() *core.Command { return &core.Command{ Short: `Delete a Cluster`, - Long: `Delete a specific Kubernetes cluster and all its associated pools and nodes. Note that this method will not delete any Load Balancer or Block Volume that are associated with the cluster.`, + Long: `Delete a specific Kubernetes cluster and all its associated pools and nodes, and possibly its associated Load Balancers or Block Volumes.`, Namespace: "k8s", Resource: "cluster", Verb: "delete", @@ -926,12 +927,12 @@ func k8sClusterDelete() *core.Command { }, Examples: []*core.Example{ { - Short: "Delete a cluster", - Raw: `scw k8s cluster delete 11111111-1111-1111-111111111111`, + Short: "Delete a cluster without deleting its Block volumes and Load Balancers", + Raw: `scw k8s cluster delete 11111111-1111-1111-1111-111111111111`, }, { - Short: "Delete a cluster with its Block volumes and Load Balancers", - Raw: `scw k8s cluster delete 11111111-1111-1111-111111111111 with-additional-resources=true`, + Short: "Delete a cluster with its Block volumes and Load Balancers (best effort)", + Raw: `scw k8s cluster delete 11111111-1111-1111-1111-111111111111 with-additional-resources=true`, }, }, } @@ -980,12 +981,12 @@ func k8sClusterUpgrade() *core.Command { }, Examples: []*core.Example{ { - Short: "Upgrade a cluster version 1.27.0 of Kubernetes (pools *are not* included)", - Raw: `scw k8s cluster upgrade 11111111-1111-1111-111111111111 version=1.27.0`, + Short: "Upgrade a cluster to version 1.31.2 of Kubernetes (pools *are not* included)", + Raw: `scw k8s cluster upgrade 11111111-1111-1111-1111-111111111111 version=1.31.2`, }, { - Short: "Upgrade a cluster to version 1.27.0 of Kubernetes (pools *are* included)", - Raw: `scw k8s cluster upgrade 11111111-1111-1111-111111111111 version=1.27.0 upgrade-pools=true`, + Short: "Upgrade a cluster to version 1.31.2 of Kubernetes (pools *are* included)", + Raw: `scw k8s cluster upgrade 11111111-1111-1111-1111-111111111111 version=1.31.2 upgrade-pools=true`, }, }, } @@ -994,7 +995,7 @@ func k8sClusterUpgrade() *core.Command { func k8sClusterSetType() *core.Command { return &core.Command{ Short: `Change the Cluster type`, - Long: `Change the type of a specific Kubernetes cluster. To see the possible values you can enter for the ` + "`" + `type` + "`" + ` field, [list available cluster types](#path-clusters-list-available-cluster-types-for-a-cluster).`, + Long: `Change the type of a specific Kubernetes cluster. To see the possible values you can enter for the ` + "`" + `type` + "`" + ` field, [list available cluster types](#list-available-cluster-types-for-a-cluster).`, Namespace: "k8s", Resource: "cluster", Verb: "set-type", @@ -1028,7 +1029,7 @@ func k8sClusterSetType() *core.Command { Examples: []*core.Example{ { Short: "Convert a kapsule cluster to a kapsule-dedicated-16 cluster", - Raw: `scw k8s cluster set-type 11111111-1111-1111-111111111111 type=kapsule-dedicated-16`, + Raw: `scw k8s cluster set-type 11111111-1111-1111-1111-111111111111 type=kapsule-dedicated-16`, }, }, } @@ -1064,7 +1065,7 @@ func k8sClusterListAvailableVersions() *core.Command { Examples: []*core.Example{ { Short: "List all versions that a cluster can upgrade to", - Raw: `scw k8s cluster list-available-versions 11111111-1111-1111-111111111111`, + Raw: `scw k8s cluster list-available-versions 11111111-1111-1111-1111-111111111111`, }, }, View: &core.View{Fields: []*core.ViewField{ @@ -1074,9 +1075,6 @@ func k8sClusterListAvailableVersions() *core.Command { { FieldName: "Label", }, - { - FieldName: "AvailableContainerRuntimes", - }, }}, } } @@ -1111,13 +1109,40 @@ func k8sClusterListAvailableTypes() *core.Command { Examples: []*core.Example{ { Short: "List all cluster types that a cluster can upgrade to", - Raw: `scw k8s cluster list-available-types 11111111-1111-1111-111111111111`, + Raw: `scw k8s cluster list-available-types 11111111-1111-1111-1111-111111111111`, }, }, View: &core.View{Fields: []*core.ViewField{ { FieldName: "Name", }, + { + FieldName: "Dedicated", + }, + { + FieldName: "Memory", + }, + { + FieldName: "MaxEtcdSize", + }, + { + FieldName: "Resiliency", + }, + { + FieldName: "MaxNodes", + }, + { + FieldName: "SLA", + }, + { + FieldName: "AuditLogsSupported", + }, + { + FieldName: "CommitmentDelay", + }, + { + FieldName: "Availability", + }, }}, } } @@ -1125,7 +1150,7 @@ func k8sClusterListAvailableTypes() *core.Command { func k8sClusterResetAdminToken() *core.Command { return &core.Command{ Short: `Reset the admin token of a Cluster`, - Long: `Reset the admin token for a specific Kubernetes cluster. This will revoke the old admin token (which will not be usable afterwards) and create a new one. Note that you will need to download kubeconfig again to keep interacting with the cluster.`, + Long: `Reset the admin token for a specific Kubernetes cluster. This will revoke the old admin token (which will not be usable afterwards) and create a new one. Note that you will need to download the kubeconfig again to keep interacting with the cluster.`, Namespace: "k8s", Resource: "cluster", Verb: "reset-admin-token", @@ -1158,7 +1183,7 @@ func k8sClusterResetAdminToken() *core.Command { Examples: []*core.Example{ { Short: "Reset the admin token for a cluster", - Raw: `scw k8s cluster reset-admin-token 11111111-1111-1111-111111111111`, + Raw: `scw k8s cluster reset-admin-token 11111111-1111-1111-1111-111111111111`, }, }, } @@ -1166,8 +1191,9 @@ func k8sClusterResetAdminToken() *core.Command { func k8sClusterMigrateToSbsCsi() *core.Command { return &core.Command{ - Short: `Migrate a cluster to SBS CSI`, - Long: `Enable the latest CSI compatible with Scaleway Block Storage (SBS) and migrate all existing PersistentVolumes/VolumeSnapshotContents to SBS.`, + Short: `Migrate a cluster to SBS CSI`, + Long: `Enable the latest CSI compatible with Scaleway Block Storage (SBS) and migrate all existing PersistentVolumes/VolumeSnapshotContents to SBS. +Make sure to have the necessary Quota before running this command.`, Namespace: "k8s", Resource: "cluster", Verb: "migrate-to-sbs-csi", @@ -1194,7 +1220,7 @@ func k8sClusterMigrateToSbsCsi() *core.Command { Examples: []*core.Example{ { Short: "Migrate a cluster to SBS CSI", - Raw: `scw k8s cluster migrate-to-sbs-csi 11111111-1111-1111-111111111111`, + Raw: `scw k8s cluster migrate-to-sbs-csi 11111111-1111-1111-1111-111111111111`, }, }, } @@ -1439,19 +1465,19 @@ func k8sPoolList() *core.Command { Examples: []*core.Example{ { Short: "List all pools for a cluster", - Raw: `scw k8s pool list cluster-id=11111111-1111-1111-111111111111`, + Raw: `scw k8s pool list cluster-id=11111111-1111-1111-1111-111111111111`, }, { Short: "List all scaling pools for a cluster", - Raw: `scw k8s pool list cluster-id=11111111-1111-1111-111111111111 status=scaling`, + Raw: `scw k8s pool list cluster-id=11111111-1111-1111-1111-111111111111 status=scaling`, }, { Short: "List all pools for clusters containing 'foo' in their name", - Raw: `scw k8s pool list cluster-id=11111111-1111-1111-111111111111 name=foo`, + Raw: `scw k8s pool list cluster-id=11111111-1111-1111-1111-111111111111 name=foo`, }, { Short: "List all pools for a cluster and order them by ascending creation date", - Raw: `scw k8s pool list cluster-id=11111111-1111-1111-111111111111 order-by=created_at_asc`, + Raw: `scw k8s pool list cluster-id=11111111-1111-1111-1111-111111111111 order-by=created_at_asc`, }, }, View: &core.View{Fields: []*core.ViewField{ @@ -1461,6 +1487,9 @@ func k8sPoolList() *core.Command { { FieldName: "Name", }, + { + FieldName: "Zone", + }, { FieldName: "Status", }, @@ -1488,24 +1517,6 @@ func k8sPoolList() *core.Command { { FieldName: "Tags", }, - { - FieldName: "ContainerRuntime", - }, - { - FieldName: "ClusterID", - }, - { - FieldName: "Zone", - }, - { - FieldName: "Region", - }, - { - FieldName: "KubeletArgs", - }, - { - FieldName: "PlacementGroupID", - }, { FieldName: "CreatedAt", }, @@ -1550,7 +1561,7 @@ func k8sPoolCreate() *core.Command { }, { Name: "placement-group-id", - Short: `Placement group ID in which all the nodes of the pool will be created`, + Short: `Placement group ID in which all the nodes of the pool will be created, placement groups are limited to 20 instances.`, Required: false, Deprecated: false, Positional: false, @@ -1585,7 +1596,7 @@ func k8sPoolCreate() *core.Command { }, { Name: "container-runtime", - Short: `Customization of the container runtime is available for each pool. Note that ` + "`" + `docker` + "`" + ` has been deprecated since version 1.20 and will be removed by version 1.24`, + Short: `Customization of the container runtime is available for each pool`, Required: false, Deprecated: false, Positional: false, @@ -1600,7 +1611,7 @@ func k8sPoolCreate() *core.Command { }, { Name: "tags.{index}", - Short: `Tags associated with the pool`, + Short: `Tags associated with the pool, see [managing tags](https://www.scaleway.com/en/docs/containers/kubernetes/api-cli/managing-tags)`, Required: false, Deprecated: false, Positional: false, @@ -1633,7 +1644,7 @@ func k8sPoolCreate() *core.Command { }, { Name: "root-volume-type", - Short: `Defines the system volume disk type. Two different types of volume (` + "`" + `volume_type` + "`" + `) are provided: ` + "`" + `l_ssd` + "`" + ` is a local block storage which means your system is stored locally on your node's hypervisor. ` + "`" + `b_ssd` + "`" + ` is a remote block storage which means your system is stored on a centralized and resilient cluster`, + Short: `Defines the system volume disk type. Several types of volume (` + "`" + `volume_type` + "`" + `) are provided:`, Required: false, Deprecated: false, Positional: false, @@ -1666,15 +1677,15 @@ func k8sPoolCreate() *core.Command { Examples: []*core.Example{ { Short: "Create a pool named 'bar' with 2 DEV1-XL on a cluster", - Raw: `scw k8s pool create cluster-id=11111111-1111-1111-111111111111 name=bar node-type=DEV1-XL size=2`, + Raw: `scw k8s pool create cluster-id=11111111-1111-1111-1111-111111111111 name=bar node-type=DEV1-XL size=2`, }, { - Short: "Create a pool named 'fish' with 5 GP1-L, autoscaling within 0 and 10 nodes and autohealing enabled, and containerd as the cluster container runtime", - 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 pool named 'fish' with 5 GP1-L, autoscaling within 0 and 10 nodes and autohealing enabled", + Raw: `scw k8s pool create cluster-id=11111111-1111-1111-1111-111111111111 name=fish node-type=GP1-L size=5 min-size=0 max-size=10 autoscaling=true autohealing=true`, }, { - 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 cluster", - 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`, + Short: "Create a tagged pool named 'turtle' with 1 GP1-S which is using the already created placement group 22222222-2222-2222-2222-222222222222 for all the nodes in the pool on a cluster", + Raw: `scw k8s pool create cluster-id=11111111-1111-1111-1111-111111111111 name=turtle node-type=GP1-S size=1 placement-group-id=22222222-2222-2222-2222-222222222222 tags.0=turtle-uses-placement-group`, }, }, } @@ -1710,7 +1721,7 @@ func k8sPoolGet() *core.Command { Examples: []*core.Example{ { Short: "Get a given pool", - Raw: `scw k8s pool get 11111111-1111-1111-111111111111`, + Raw: `scw k8s pool get 11111111-1111-1111-1111-111111111111`, }, }, } @@ -1718,8 +1729,9 @@ func k8sPoolGet() *core.Command { func k8sPoolUpgrade() *core.Command { return &core.Command{ - Short: `Upgrade a Pool in a Cluster`, - Long: `Upgrade the Kubernetes version of a specific pool. Note that it only works if the targeted version matches the cluster's version.`, + Short: `Upgrade a Pool in a Cluster`, + Long: `Upgrade the Kubernetes version of a specific pool. Note that it only works if the targeted version matches the cluster's version. +This will drain and replace the nodes in that pool.`, Namespace: "k8s", Resource: "pool", Verb: "upgrade", @@ -1752,8 +1764,8 @@ func k8sPoolUpgrade() *core.Command { }, Examples: []*core.Example{ { - Short: "Upgrade a specific pool to the Kubernetes version 1.27.0", - Raw: `scw k8s pool upgrade 11111111-1111-1111-111111111111 version=1.27.0`, + Short: "Upgrade a specific pool to the Kubernetes version 1.31.2", + Raw: `scw k8s pool upgrade 11111111-1111-1111-1111-111111111111 version=1.31.2`, }, }, } @@ -1762,7 +1774,7 @@ func k8sPoolUpgrade() *core.Command { func k8sPoolUpdate() *core.Command { return &core.Command{ Short: `Update a Pool in a Cluster`, - Long: `Update the attributes of a specific pool, such as its desired size, autoscaling settings, and tags.`, + Long: `Update the attributes of a specific pool, such as its desired size, autoscaling settings, and tags. To upgrade a pool, you will need to use the dedicated endpoint.`, Namespace: "k8s", Resource: "pool", Verb: "update", @@ -1850,15 +1862,19 @@ func k8sPoolUpdate() *core.Command { Examples: []*core.Example{ { Short: "Enable autoscaling on a given pool", - Raw: `scw k8s pool update 11111111-1111-1111-111111111111 autoscaling=true`, + Raw: `scw k8s pool update 11111111-1111-1111-1111-111111111111 autoscaling=true`, }, { Short: "Reduce the size and maximum size of a given pool to 4", - Raw: `scw k8s pool update 11111111-1111-1111-111111111111 size=4 max-size=4`, + Raw: `scw k8s pool update 11111111-1111-1111-1111-111111111111 size=4 max-size=4`, }, { Short: "Modify the tags of a given pool", - Raw: `scw k8s pool update 11111111-1111-1111-111111111111 tags.0=my tags.1=new tags.2=pool`, + Raw: `scw k8s pool update 11111111-1111-1111-1111-111111111111 tags.0=my tags.1=new tags.2=pool`, + }, + { + Short: "Remove all tags of a given pool", + Raw: `scw k8s pool update 11111111-1111-1111-1111-111111111111 tags=none`, }, }, } @@ -1894,7 +1910,7 @@ func k8sPoolDelete() *core.Command { Examples: []*core.Example{ { Short: "Delete a specific pool", - Raw: `scw k8s pool delete 11111111-1111-1111-111111111111`, + Raw: `scw k8s pool delete 11111111-1111-1111-1111-111111111111`, }, }, } @@ -1969,15 +1985,15 @@ func k8sNodeList() *core.Command { Examples: []*core.Example{ { Short: "List all the nodes in the cluster", - Raw: `scw k8s node list cluster-id=11111111-1111-1111-111111111111`, + Raw: `scw k8s node list cluster-id=11111111-1111-1111-1111-111111111111`, }, { - Short: "List all the nodes in the cluster's 2222222222222-2222-222222222222 pool", - Raw: `scw k8s node list cluster-id=11111111-1111-1111-111111111111 pool-id=2222222222222-2222-222222222222`, + Short: "List all the nodes in the cluster's 22222222-2222-2222-2222-222222222222 pool", + Raw: `scw k8s node list cluster-id=11111111-1111-1111-1111-111111111111 pool-id=22222222-2222-2222-2222-222222222222`, }, { Short: "List all cluster nodes that are ready", - Raw: `scw k8s node list cluster-id=11111111-1111-1111-111111111111 status=ready`, + Raw: `scw k8s node list cluster-id=11111111-1111-1111-1111-111111111111 status=ready`, }, }, View: &core.View{Fields: []*core.ViewField{ @@ -2039,7 +2055,7 @@ func k8sNodeGet() *core.Command { Examples: []*core.Example{ { Short: "Get a node", - Raw: `scw k8s node get 11111111-1111-1111-111111111111`, + Raw: `scw k8s node get 11111111-1111-1111-1111-111111111111`, }, }, } @@ -2048,7 +2064,7 @@ func k8sNodeGet() *core.Command { func k8sNodeReplace() *core.Command { return &core.Command{ Short: `Replace a Node in a Cluster`, - Long: `Replace a specific Node. The node will first be cordoned (scheduling will be disabled on it). The existing pods on the node will then be drained and rescheduled onto another schedulable node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster), disruption of your applications can be expected.`, + Long: `Replace a specific Node. The node will first be drained and pods will be rescheduled onto another node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster, or with specific constraints), disruption of your applications may occur.`, Namespace: "k8s", Resource: "node", Verb: "replace", @@ -2075,7 +2091,7 @@ func k8sNodeReplace() *core.Command { Examples: []*core.Example{ { Short: "Replace a node", - Raw: `scw k8s node replace 11111111-1111-1111-111111111111`, + Raw: `scw k8s node replace 11111111-1111-1111-1111-111111111111`, }, }, } @@ -2084,7 +2100,7 @@ func k8sNodeReplace() *core.Command { func k8sNodeReboot() *core.Command { return &core.Command{ Short: `Reboot a Node in a Cluster`, - Long: `Reboot a specific Node. The node will first be cordoned (scheduling will be disabled on it). The existing pods on the node will then be drained and rescheduled onto another schedulable node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster), disruption of your applications can be expected.`, + Long: `Reboot a specific Node. The node will first be drained and pods will be rescheduled onto another node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster, or with specific constraints), disruption of your applications may occur.`, Namespace: "k8s", Resource: "node", Verb: "reboot", @@ -2111,7 +2127,7 @@ func k8sNodeReboot() *core.Command { Examples: []*core.Example{ { Short: "Reboot a node", - Raw: `scw k8s node reboot 11111111-1111-1111-111111111111`, + Raw: `scw k8s node reboot 11111111-1111-1111-1111-111111111111`, }, }, } @@ -2120,7 +2136,7 @@ func k8sNodeReboot() *core.Command { func k8sNodeDelete() *core.Command { return &core.Command{ Short: `Delete a Node in a Cluster`, - Long: `Delete a specific Node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster), disruption of your applications can be expected.`, + Long: `Delete a specific Node. The node will first be drained and pods will be rescheduled onto another node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster, or with specific constraints), disruption of your applications may occur.`, Namespace: "k8s", Resource: "node", Verb: "delete", @@ -2161,15 +2177,15 @@ func k8sNodeDelete() *core.Command { Examples: []*core.Example{ { Short: "Delete a node", - Raw: `scw k8s node delete 11111111-1111-1111-111111111111`, + Raw: `scw k8s node delete 11111111-1111-1111-1111-111111111111`, }, { Short: "Delete a node without evicting workloads", - Raw: `scw k8s node delete 11111111-1111-1111-111111111111 skip-drain=true`, + Raw: `scw k8s node delete 11111111-1111-1111-1111-111111111111 skip-drain=true`, }, { Short: "Replace a node by a new one", - Raw: `scw k8s node delete 11111111-1111-1111-111111111111 replace=true`, + Raw: `scw k8s node delete 11111111-1111-1111-1111-111111111111 replace=true`, }, }, } @@ -2253,8 +2269,8 @@ func k8sVersionGet() *core.Command { }, Examples: []*core.Example{ { - Short: "Get the Kubernetes version 1.27.0", - Raw: `scw k8s version get 1.27.0`, + Short: "Get the Kubernetes version 1.31.2", + Raw: `scw k8s version get 1.31.2`, }, }, }