Migrating Kubernetes Clusters from Docker to containerd

This topic describes migrating legacy Kubernetes clusters from Docker container runtime to the the new Hewlett Packard Enterprise distribution of Kubernetes, which implements containerd runtime.

Prerequisites

About this task

Legacy Kubernetes clusters using Docker container runtime must be migrated to the Hewlett Packard Enterprise distribution of Kubernetes, which implements containerd runtime.
NOTE The Kubernetes cluster is unavailable for user workloads during migration.
IMPORTANT Setups with only 1 master host require extra hardware to ensure ETCD data is not lost.

To simplify this migration process, Hewlett Packard Enterprise can provide a command line migration tool that runs on the HPE Ezmeral Runtime Enterprise Controller node, either as root or as the user who installed HPE Ezmeral Runtime Enterprise. For more information, contact Hewlett Packard Enterprise support.

Procedure

  1. Migrate the Kubernetes master hosts:
    1. Shrink the Kubernetes masters, one host at a time.
    2. Delete each Kubernetes master host removed in the previous step.
    3. Re-add each host that you deleted in the previous step as a Kubernetes host, and assign it the master role. Each newly added host comes up with the Hewlett Packard Enterprise distribution of Kubernetes and containerd runtime.
    4. Repeat this process for any remaining masters that are still on Docker container runtime.
  2. Migrate the Kubernetes worker hosts:
    1. After migrating the Kubernetes masters to containerd, delete the Kubernetes workers one host at a time.
    2. Re-add each host that you deleted in the previous step as a Kubernetes worker host. Each newly added host comes up with the Hewlett Packard Enterprise distribution of Kubernetes and containerd runtime.
    3. Repeat this process for any remaining workers that are still on Docker container runtime.