How to manage nodes and node pools on an OVHcloud Managed Kubernetes cluster

Objective

The OVHcloud Managed Kubernetes service provides you with production-ready Kubernetes clusters without the hassle of installing or operating them.

This guide covers one of the first steps after ordering a cluster: managing nodes and node pools.

Depending on your preferred workflow, you can manage them through:

We will walk you through each method to help you efficiently scale and manage your Kubernetes infrastructure.

Requirements

  • You have an OVHcloud Managed Kubernetes cluster.
  • If you plan to manage node pools using the NodePools CRD, make sure you have the kubectl command-line tool installed. You can find detailed installation instructions on the official Kubernetes website.

OVHcloud Control Panel Access


On nodes and node pools

Via the OVHcloud Control Panel
Via the OVHcloud API
Via the NodePools CRD

In your OVHcloud Managed Kubernetes cluster, nodes are grouped in node pools (group of nodes sharing the same configuration).

When you order a new cluster, it is created with a default node pool. Refer to our guide on creating a cluster for more information.

In this guide we explain how to do some basic operations with nodes and node pools using the Public Cloud section of the OVHcloud Control Panel.

Instructions

Via the OVHcloud Control Panel
Via the OVHcloud API
Via the NodePools CRD

Access the administration UI for your OVHcloud Managed Kubernetes clusters by clicking on Managed Kubernetes Service in the left-hand menu. In the table, select a cluster by clicking on the cluster name.

Access to the administration UI

In this administration UI you have several tabs:

  • Service: Here you will have a global view of your cluster, with important information like the status, the API URL or the kubectl configuration file.

  • Node pools: You will find here the active node pools of your cluster. You will be able to add, resize or remove node pools.

  • APIServer access: You can add IPv4 ranges in order to restrict access to your cluster’s APIServer.

  • Audit Logs: Here, you will find the logs for your Kubernetes cluster’s control plane.

Getting your cluster information

Via the OVHcloud Control Panel
Via the OVHcloud API

Click on Managed Kubernetes Service, then click on the name of the relevant cluster.

cluster information via the OVHcloud Control Panel

Listing node pools

Via the OVHcloud Control Panel
Via the OVHcloud API
Via the NodePools CRD

Click on Managed Kubernetes Service, then click on the name of the relevant cluster and open the Node pools tab.

List nodes pools via manager

Getting information on a node pool

Via the OVHcloud Control Panel
Via the OVHcloud API
Via the NodePools CRD

Click on Managed Kubernetes Service, then click on the name of the relevant cluster and open the Node pools tab.

List nodes pools

You can also view the nodes that make up a node pool, by clicking on the name of one of them.

Create a node pool

Via the OVHcloud Control Panel
Via the OVHcloud API

In the Node pools tab, click on the button Add a node pool.

Creating a node pool

Fill the fields to create a new node pool.

Warning

The name of node pool should be in lowercase. The “_” and “.” characters are not allowed. The node pool name cannot begin with a number.

The subsequent node pool configuration steps are described in Creating a cluster.

Info

To learn more about the flavors of the current OVHcloud range, refer to this page.

The API will return you the new node pool information.

Result:

{
  "id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
  "projectId": "",
  "name": "my-node-pool",
  "flavor": "b2-7",
  "status": "INSTALLING",
  "sizeStatus": "UNDER_CAPACITY",
  "autoscale": false,
  "monthlyBilled": false,
  "antiAffinity": false,
  "desiredNodes": 1,
  "minNodes": 0,
  "maxNodes": 100,
  "currentNodes": 1,
  "availableNodes": 0,
  "upToDateNodes": 1,
  "createdAt": "2023-02-14T09:39:47Z",
  "updatedAt": "2023-02-14T09:39:47Z",
  "autoscaling": {
    "scaleDownUtilizationThreshold": 0.5,
    "scaleDownUnneededTimeSeconds": 600,
    "scaleDownUnreadyTimeSeconds": 1200
  },
  "template": {
    "metadata": {
      "labels": {},
      "annotations": {},
      "finalizers": []
    },
    "spec": {
      "unschedulable": false,
      "taints": []
    }
  }
}

Via the NodePools CRD To create a new node pool, you simply need to create a new node pool manifest.

Copy the next YAML manifest in a new-nodepool.yaml file:

apiVersion: kube.cloud.ovh.com/v1alpha1
kind: NodePool
metadata:
  name: my-new-node-pool
spec:
  antiAffinity: false
  autoscale: false
  autoscaling:
    scaleDownUnneededTimeSeconds: 600
    scaleDownUnreadyTimeSeconds: 1200
    scaleDownUtilizationThreshold: "0.5"
  desiredNodes: 3
  flavor: b2-7
  maxNodes: 100
  minNodes: 0
  monthlyBilled: false
INFO

antiAffinity, flavor and name fields will not be editable after creation.
You cannot change the monthlyBilled field from true to false.

Then apply it to your cluster:

kubectl apply -f new-nodepool.yaml

Your new node pool will be created:

$ kubectl apply -f new-nodepool.yaml
nodepool.kube.cloud.ovh.com/my-new-node-pool created

$ kubectl get nodepools
NAME               FLAVOR   AUTOSCALED   MONTHLY BILLED   ANTIAFFINITY   DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   MIN   MAX   AGE
my-new-node-pool   b2-7     false        false            false          3                                            0     100   3s
nodepool-b2-7      b2-7     false        true             true           2         2         2            2           0     5     14d

At the beginning the new node pool is empty, but if you wait a few seconds, you will see how the nodes are progressively created and made available (one after another)...

$ kubectl get nodepools
NAME               FLAVOR   AUTOSCALED   MONTHLY BILLED   ANTIAFFINITY   DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   MIN   MAX   AGE
my-new-node-pool   b2-7     false        false            false          3         3         3                        0     100   3s
nodepool-b2-7      b2-7     false        true             true           2         2         2            2           0     5     14d

Updating the node pool

Via the OVHcloud Control Panel
Via the OVHcloud API
Via the NodePools CRD

Configuring a node pool

To access the nodes configuration, switch to the Node pools tab. Click on the ... button in the row of the node pool concerned, then select See nodes.

Edit node pool

Here you can change the billing method for a node or delete a node by clicking on the respective ... button of a node.

node pool
Info

You can only switch from an hourly billing method to a monthly billing method, not vice versa.

Adding nodes to an existing node pool

In the Node pools tab, click on the ... button in the row of the node pool concerned, then select Configure node pool size.

node size

In the popup window, you can re-size your node pool by adding nodes. You can alternatively enable the autoscaling feature which allows you to set the minimum and maximum pool size instead.

autoscaling

Deleting a node pool

Via the OVHcloud Control Panel
Via the OVHcloud API
Via the NodePools CRD

In the Node pools tab, click on the ... button in the row of the node pool concerned, then select Delete pool.

Delete node pool

Confirm the decision by typing DELETE into the field, then click on the Delete button.

Delete node pool

Go further

To have an overview of the OVHcloud Managed Kubernetes service, visit the OVHcloud Managed Kubernetes page.

To deploy your first application on your Kubernetes cluster, we invite you to follow our guides to configure default settings for kubectl and to deploy a Hello World application.

If you need training or technical assistance to implement our solutions, contact your sales representative or click on this link to get a quote and ask our Professional Services experts for a custom analysis of your project.

Join our community of users.

Esta página foi útil?