Skip to content

Commit 55f8111

Browse files
authored
docs(k8s): improve documentation (#4383)
1 parent 49c98f9 commit 55f8111

27 files changed

+276
-240
lines changed

cmd/scw/testdata/test-all-usage-k8s-cluster-create-usage.golden

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,39 @@ USAGE:
66
scw k8s cluster create [arg=value ...]
77

88
EXAMPLES:
9-
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
10-
scw k8s cluster create name=foo version=1.27.0 pools.0.size=3 pools.0.node-type=DEV1-M pools.0.name=default
9+
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
10+
scw k8s cluster create name=foo version=1.31.2 pools.0.size=3 pools.0.node-type=DEV1-M pools.0.name=default
1111

12-
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)
13-
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
12+
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)
13+
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
1414

1515
ARGS:
1616
[project-id] Project ID to use. If none is passed the default project ID will be used
17-
[type] Type of the cluster (possible values are kapsule, multicloud, kapsule-dedicated-8, kapsule-dedicated-16)
17+
[type] Type of the cluster. See [list available cluster types](#list-available-cluster-types-for-a-cluster) for a list of valid types
1818
name=<generated> Cluster name
1919
[description] Cluster description
2020
[tags.{index}] Tags associated with the cluster
2121
version=latest Kubernetes version of the cluster
2222
cni=cilium Container Network Interface (CNI) plugin running in the cluster (unknown_cni | cilium | calico | weave | flannel | kilo | none)
2323
[pools.{index}.name] Name of the pool
2424
[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
25-
[pools.{index}.placement-group-id] Placement group ID in which all the nodes of the pool will be created
25+
[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.
2626
[pools.{index}.autoscaling] Defines whether the autoscaling feature is enabled for the pool
2727
[pools.{index}.size] Size (number of nodes) of the pool
2828
[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
2929
[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
30-
[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)
30+
[pools.{index}.container-runtime] Customization of the container runtime is available for each pool (unknown_runtime | docker | containerd | crio)
3131
[pools.{index}.autohealing] Defines whether the autohealing feature is enabled for the pool
32-
[pools.{index}.tags.{index}] Tags associated with the pool
32+
[pools.{index}.tags.{index}] Tags associated with the pool, see [managing tags](https://www.scaleway.com/en/docs/containers/kubernetes/api-cli/managing-tags)
3333
[pools.{index}.kubelet-args.{key}] Kubelet arguments to be used by this pool. Note that this feature is experimental
3434
[pools.{index}.upgrade-policy.max-unavailable] The maximum number of nodes that can be not ready at the same time
3535
[pools.{index}.upgrade-policy.max-surge] The maximum number of nodes to be created during the upgrade
3636
[pools.{index}.zone] Zone in which the pool's nodes will be spawned
37-
[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)
37+
[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)
3838
[pools.{index}.root-volume-size] System volume disk size
3939
[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
4040
[autoscaler-config.scale-down-disabled] Disable the cluster autoscaler
41-
[autoscaler-config.scale-down-delay-after-add] How long after scale up that scale down evaluation resumes
41+
[autoscaler-config.scale-down-delay-after-add] How long after scale up the scale down evaluation resumes
4242
[autoscaler-config.estimator] Type of resource estimator to be used in scale up (unknown_estimator | binpacking)
4343
[autoscaler-config.expander] Type of node group expander to be used in scale up (unknown_expander | random | most_pods | least_waste | priority | price)
4444
[autoscaler-config.ignore-daemonsets-utilization] Ignore DaemonSet pods when calculating resource utilization for scaling down

cmd/scw/testdata/test-all-usage-k8s-cluster-delete-usage.golden

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
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.
3+
Delete a specific Kubernetes cluster and all its associated pools and nodes, and possibly its associated Load Balancers or Block Volumes.
44

55
USAGE:
66
scw k8s cluster delete <cluster-id ...> [arg=value ...]
77

88
EXAMPLES:
9-
Delete a cluster
10-
scw k8s cluster delete 11111111-1111-1111-111111111111
9+
Delete a cluster without deleting its Block volumes and Load Balancers
10+
scw k8s cluster delete 11111111-1111-1111-1111-111111111111
1111

12-
Delete a cluster with its Block volumes and Load Balancers
13-
scw k8s cluster delete 11111111-1111-1111-111111111111 with-additional-resources=true
12+
Delete a cluster with its Block volumes and Load Balancers (best effort)
13+
scw k8s cluster delete 11111111-1111-1111-1111-111111111111 with-additional-resources=true
1414

1515
ARGS:
1616
cluster-id ID of the cluster to delete

cmd/scw/testdata/test-all-usage-k8s-cluster-get-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ USAGE:
77

88
EXAMPLES:
99
Get a cluster information
10-
scw k8s cluster get 11111111-1111-1111-111111111111
10+
scw k8s cluster get 11111111-1111-1111-1111-111111111111
1111

1212
ARGS:
1313
cluster-id ID of the requested cluster

cmd/scw/testdata/test-all-usage-k8s-cluster-list-available-types-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ USAGE:
77

88
EXAMPLES:
99
List all cluster types that a cluster can upgrade to
10-
scw k8s cluster list-available-types 11111111-1111-1111-111111111111
10+
scw k8s cluster list-available-types 11111111-1111-1111-1111-111111111111
1111

1212
ARGS:
1313
cluster-id Cluster ID for which the available Kubernetes types will be listed

cmd/scw/testdata/test-all-usage-k8s-cluster-list-available-versions-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ USAGE:
77

88
EXAMPLES:
99
List all versions that a cluster can upgrade to
10-
scw k8s cluster list-available-versions 11111111-1111-1111-111111111111
10+
scw k8s cluster list-available-versions 11111111-1111-1111-1111-111111111111
1111

1212
ARGS:
1313
cluster-id Cluster ID for which the available Kubernetes versions will be listed

cmd/scw/testdata/test-all-usage-k8s-cluster-migrate-to-sbs-csi-usage.golden

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
33
Enable the latest CSI compatible with Scaleway Block Storage (SBS) and migrate all existing PersistentVolumes/VolumeSnapshotContents to SBS.
4+
Make sure to have the necessary Quota before running this command.
45

56
USAGE:
67
scw k8s cluster migrate-to-sbs-csi <cluster-id ...> [arg=value ...]
78

89
EXAMPLES:
910
Migrate a cluster to SBS CSI
10-
scw k8s cluster migrate-to-sbs-csi 11111111-1111-1111-111111111111
11+
scw k8s cluster migrate-to-sbs-csi 11111111-1111-1111-1111-111111111111
1112

1213
ARGS:
1314
cluster-id Cluster ID for which the latest CSI compatible with Scaleway Block Storage will be enabled

cmd/scw/testdata/test-all-usage-k8s-cluster-reset-admin-token-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
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.
3+
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.
44

55
USAGE:
66
scw k8s cluster reset-admin-token <cluster-id ...> [arg=value ...]
77

88
EXAMPLES:
99
Reset the admin token for a cluster
10-
scw k8s cluster reset-admin-token 11111111-1111-1111-111111111111
10+
scw k8s cluster reset-admin-token 11111111-1111-1111-1111-111111111111
1111

1212
ARGS:
1313
cluster-id Cluster ID on which the admin token will be renewed

cmd/scw/testdata/test-all-usage-k8s-cluster-set-type-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
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).
3+
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).
44

55
USAGE:
66
scw k8s cluster set-type <cluster-id ...> [arg=value ...]
77

88
EXAMPLES:
99
Convert a kapsule cluster to a kapsule-dedicated-16 cluster
10-
scw k8s cluster set-type 11111111-1111-1111-111111111111 type=kapsule-dedicated-16
10+
scw k8s cluster set-type 11111111-1111-1111-1111-111111111111 type=kapsule-dedicated-16
1111

1212
ARGS:
1313
cluster-id ID of the cluster to migrate from one type to another

cmd/scw/testdata/test-all-usage-k8s-cluster-update-usage.golden

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,19 @@ USAGE:
66
scw k8s cluster update <cluster-id ...> [arg=value ...]
77

88
EXAMPLES:
9-
Add TTLAfterFinished and ServiceNodeExclusion as feature gates on a cluster
10-
scw k8s cluster update 11111111-1111-1111-111111111111 feature-gates.0=TTLAfterFinished feature-gates.1=ServiceNodeExclusion
9+
Add InPlacePodVerticalScaling and SidecarContainers as feature gates on a cluster
10+
scw k8s cluster update 11111111-1111-1111-1111-111111111111 feature-gates.0=InPlacePodVerticalScaling feature-gates.1=SidecarContainers
11+
12+
Remove all custom feature gates on a cluster
13+
scw k8s cluster update 11111111-1111-1111-1111-111111111111 feature-gates=none
1114

1215
ARGS:
1316
cluster-id ID of the cluster to update
1417
[name] New external name for the cluster
1518
[description] New description for the cluster
1619
[tags.{index}] New tags associated with the cluster
1720
[autoscaler-config.scale-down-disabled] Disable the cluster autoscaler
18-
[autoscaler-config.scale-down-delay-after-add] How long after scale up that scale down evaluation resumes
21+
[autoscaler-config.scale-down-delay-after-add] How long after scale up the scale down evaluation resumes
1922
[autoscaler-config.estimator] Type of resource estimator to be used in scale up (unknown_estimator | binpacking)
2023
[autoscaler-config.expander] Type of node group expander to be used in scale up (unknown_expander | random | most_pods | least_waste | priority | price)
2124
[autoscaler-config.ignore-daemonsets-utilization] Ignore DaemonSet pods when calculating resource utilization for scaling down

cmd/scw/testdata/test-all-usage-k8s-cluster-upgrade-usage.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ USAGE:
66
scw k8s cluster upgrade <cluster-id ...> [arg=value ...]
77

88
EXAMPLES:
9-
Upgrade a cluster version 1.27.0 of Kubernetes (pools *are not* included)
10-
scw k8s cluster upgrade 11111111-1111-1111-111111111111 version=1.27.0
9+
Upgrade a cluster to version 1.31.2 of Kubernetes (pools *are not* included)
10+
scw k8s cluster upgrade 11111111-1111-1111-1111-111111111111 version=1.31.2
1111

12-
Upgrade a cluster to version 1.27.0 of Kubernetes (pools *are* included)
13-
scw k8s cluster upgrade 11111111-1111-1111-111111111111 version=1.27.0 upgrade-pools=true
12+
Upgrade a cluster to version 1.31.2 of Kubernetes (pools *are* included)
13+
scw k8s cluster upgrade 11111111-1111-1111-1111-111111111111 version=1.31.2 upgrade-pools=true
1414

1515
ARGS:
1616
cluster-id ID of the cluster to upgrade

cmd/scw/testdata/test-all-usage-k8s-node-delete-usage.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
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.
3+
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.
44

55
USAGE:
66
scw k8s node delete <node-id ...> [arg=value ...]
77

88
EXAMPLES:
99
Delete a node
10-
scw k8s node delete 11111111-1111-1111-111111111111
10+
scw k8s node delete 11111111-1111-1111-1111-111111111111
1111

1212
Delete a node without evicting workloads
13-
scw k8s node delete 11111111-1111-1111-111111111111 skip-drain=true
13+
scw k8s node delete 11111111-1111-1111-1111-111111111111 skip-drain=true
1414

1515
Replace a node by a new one
16-
scw k8s node delete 11111111-1111-1111-111111111111 replace=true
16+
scw k8s node delete 11111111-1111-1111-1111-111111111111 replace=true
1717

1818
ARGS:
1919
node-id ID of the node to replace

cmd/scw/testdata/test-all-usage-k8s-node-get-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ USAGE:
77

88
EXAMPLES:
99
Get a node
10-
scw k8s node get 11111111-1111-1111-111111111111
10+
scw k8s node get 11111111-1111-1111-1111-111111111111
1111

1212
ARGS:
1313
node-id ID of the requested node

cmd/scw/testdata/test-all-usage-k8s-node-list-usage.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ USAGE:
77

88
EXAMPLES:
99
List all the nodes in the cluster
10-
scw k8s node list cluster-id=11111111-1111-1111-111111111111
10+
scw k8s node list cluster-id=11111111-1111-1111-1111-111111111111
1111

12-
List all the nodes in the cluster's 2222222222222-2222-222222222222 pool
13-
scw k8s node list cluster-id=11111111-1111-1111-111111111111 pool-id=2222222222222-2222-222222222222
12+
List all the nodes in the cluster's 22222222-2222-2222-2222-222222222222 pool
13+
scw k8s node list cluster-id=11111111-1111-1111-1111-111111111111 pool-id=22222222-2222-2222-2222-222222222222
1414

1515
List all cluster nodes that are ready
16-
scw k8s node list cluster-id=11111111-1111-1111-111111111111 status=ready
16+
scw k8s node list cluster-id=11111111-1111-1111-1111-111111111111 status=ready
1717

1818
ARGS:
1919
cluster-id Cluster ID from which the nodes will be listed from

cmd/scw/testdata/test-all-usage-k8s-node-reboot-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
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.
3+
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.
44

55
USAGE:
66
scw k8s node reboot <node-id ...> [arg=value ...]
77

88
EXAMPLES:
99
Reboot a node
10-
scw k8s node reboot 11111111-1111-1111-111111111111
10+
scw k8s node reboot 11111111-1111-1111-1111-111111111111
1111

1212
ARGS:
1313
node-id ID of the node to reboot

cmd/scw/testdata/test-all-usage-k8s-node-replace-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
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.
3+
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.
44

55
USAGE:
66
scw k8s node replace <node-id ...> [arg=value ...]
77

88
EXAMPLES:
99
Replace a node
10-
scw k8s node replace 11111111-1111-1111-111111111111
10+
scw k8s node replace 11111111-1111-1111-1111-111111111111
1111

1212
ARGS:
1313
node-id ID of the node to replace

0 commit comments

Comments
 (0)