How to manage a Kubernetes Kosmos cluster
You can add nodes and pools to your Kosmos cluster from the Scaleway console or by using the API. Here, we show you how to edit from the console.
You may need certain IAM permissions to carry out some actions described on this page. This means:
- you are the Owner of the Scaleway Organization in which the actions will be carried out, or
- you are an IAM user of the Organization, with a policy granting you the necessary permission sets
This document concerns the management of a Kosmos cluster. For a Kapsule cluster, refer to the corresponding documentation for Kapsule
Be aware that nodes from multi-cloud pools cannot benefit from the auto-healing and auto-scaling features of Scaleway Kapsule pool. Since Scaleway does not have access to your other providers’ accounts, it is not possible to carry out actions such as automatic deletion, creation, and reboot of external nodes.
- You have an account and are logged into the Scaleway console
- You have created a Kubernetes Kosmos cluster
- You have external machines (
arm64
oramd64
) running Ubuntu or Debian that you want to add to your cluster
How to add a multi-cloud pool to your Kosmos cluster
A multi-cloud pool allows you to attach external Instances and servers to your cluster. Instances added to the same pool do not need to share the same configuration, nor do they have to be managed by the same Cloud provider.
- Click Kubernetes in the Containers section of the side menu. The Kubernetes creation page displays.
- Click the cluster you want to add a pool to.
- Click the Pools tab.
- Click the + Add pool button. The pool creation wizard displays.
- Complete the following steps of the wizard:
- Choose a pool type. This can be a Scaleway Kubernetes Kapsule Pool or a Kubernetes multi-cloud Pool. This document concerns the addition of a multi-cloud Pool.
- A name for the pool and optionally a description and tags.
- Click Add pool to finish.
How to add external nodes to your multi-cloud pool
In order to add external nodes to your multi-cloud cluster, you must first create a multi-cloud pool. For security reasons, it is recommended to configure an API key with the KubernetesExternalNodeRegister
IAM permission set.
- Click Identity and Access Management (IAM) from the top-right of your Organization Dashboard in the Scaleway console. The Identity and Access Management dashboard displays.
- Create an IAM Policy with the
KubernetesExternalNodeRegister
PermissionSet only. - Create an IAM Application linked with the policy created in the previous step.
- Create a new API key linked to the IAM application created in the previous step.
Tip:
Identity and Access Management (IAM) allows you to share access to the management of your Scaleway resources and Organization settings, in a controlled and secure manner. For more information, refer to our dedicated IAM documentation.
- Click Kubernetes in the Compute section of the side menu. The Kubernetes creation page displays.
- Click the cluster you want to add external nodes to.
- Click Nodes on the tab.
- Click + Add an external node. The instructions for adding an external node display.
How to configure external nodes to join the cluster
-
Get your server’s public IP and SSH to the server:
ssh <user>@<server_ip> -
Download the
node-agent
program:wget https://scwcontainermulticloud.s3.fr-par.scw.cloud/node-agent_linux_amd64 && chmod +x node-agent_linux_amd64 -
Export the required environment variables:
export POOL_ID=<pool_id> POOL_REGION=<cluster_region> SCW_SECRET_KEY=<secret_key> -
Execute the program to attach the node to the multi cloud pool:
sudo -E ./node-agent_linux_amd64 -loglevel 0 -no-controllerNote:There is also an ARM binary (named
node-agent_linux_arm64
) for ARM-based nodes.
How to detach nodes from your multi-cloud pool
- Click Kubernetes in the Compute section of the side menu. The Kubernetes creation page displays.
- Click the cluster in question.
- Click the Nodes tab.
- Click the unlink icon next to the node you want to detach. A pop-up asks you to confirm the action.
- Click Detach node.
Note:
This action will remove your node from the cluster. Your external node will not be deleted from your other cloud provider account(s).
How to upgrade nodes in a multi-cloud pool in your Kosmos cluster
The Kubernetes version of the existing nodes in your multi-cloud pool can be upgraded in place. Your workload will theoretically keep running during the upgrade but it is best to drain the node before the upgrade.
- In the Pools section of your Kosmos cluster, click Upgrade next to the node pool. This will not cause any of your existing nodes to upgrade, but will instead ensure that any new nodes added to the pool will start up with the newer version.
- Run the installer program as you would do for a fresh node install with the additional option
-self-update
. If the option is not available, redownload the program from S3 bucket. - Now the node will register itself with the Apiserver. Once it is ready you will see the same node with two kubelet versions. The older node should end up
NotReady
after 5m, you can safely delete it withkubectl
. - Detach the older node in Scaleway API.