How to change the Container Runtime Interface (CRI) of an existing node pool
A container runtime is a software that manages the starting and stopping of containers, among other tasks. It is a fundamental component of Kubernetes. Initially, Docker was used as the container runtime for Kubernetes. However, as container runtimes continued to evolve rapidly, it became apparent that Docker was not the best choice. Other solutions emerged as more suitable alternatives.
The Container Runtime Interface (CRI) was developed as a means to open up Kubernetes to other container runtimes. CRI is a plugin within a Kubernetes cluster that allows the
kubelet to use more than one type of container runtime. It consists of a protocol buffer and a gRPC API, as well as libraries, with additional specifications and tools.
At Scaleway, we favor Containerd, the industry-leading CRI solution. Containerd was initially developed by Docker and donated to the Cloud Native Computing Foundation (CNCF). It uses a subset of the original Docker engine and comes with most of Docker’s functionalities for running containers and managing storage and images - but lacks many developer-oriented features. It is, therefore, suitable for large-scale use as part of a container orchestrator, such as Kubernetes.
With Kubernetes version 1.25, Scaleway Kubernetes Kapsule will deprecate all Kubernetes interfaces named
If you are still using one of the deprecated CRIs, your cluster will have the following limitations:
- Pools using deprecated CRIs cannot scale up.
- Control planes cannot be upgraded if the CRI used by a pool is deprecated.
To migrate your node pools to a supported CRI, you have to create a new resource pool supporting
containerd, move your pods to the new pool and then delete your old pool.
You may need certain IAM permissions to carry out some actions described on this page. This means:
- Click Kubernetes in the Containers section of the Scaleway console side menu. The Kubernetes Kapsule dashboard displays.
- Click «See more Icon» next to the cluster you want to edit and click More info to find detailed information about the cluster.
- Click the Pools tab to view the node pools associated with your cluster.
Any node pool using
cri-oruntimes is deprecated.
- Click + Add a new pool. The pool creation wizard displays.
- Configure your new node pool:
- Select a zone for your pool. The zone of your pool must match the zone your cluster is deployed in.
- Select the node type to be used for your pool.
- Configure pool options, such as autoscaling and autohealing.
- Click Add pool to create the new pool and to add it to your cluster.
- Use the
kubectl get nodescommand to retrieve a list of your nodes.
- Mark the nodes of your old pool as unschedulable using the
kubectl cordoncommand:kubectl cordon <old_node_1>kubectl cordon <old_node_2>...Important:
If you have used local storage on your old nodes, data must be copied manually before moving pods and deleting nodes.
- Empty the nodes using the
kubectl draincommand:Your old nodes will be emptied, and the pods are recreated in the new pool.kubectl drain <old_node_1>kubectl drain <old_node_2>...
- Delete your old pool by clicking on «See more Icon» > Delete next to the pool’s name once all your pods are up again.