Link Search Menu Expand Document

General Container Runtime Information

For a long time now Docker (or rather the dockershim to be more precise) has been used as the default Container Runtime Engine in the underlying infrastructure of Kubernetes. But maintaining this dockershim on the development side has become a heaven burden on the Kubernetes maintainers. To reduce this burden the CRI standard has been implemented, but unfortunately Docker itself does not implement this standard (hence the dockershim!).

With the Kubernetes v1.20 release the deprecation of the dockershim has been announced, scheduled for the release of v1.24. So to be able to upgrade to Kubernetes v1.24 we will need the Kubernetes nodes to run a different container runtime engine which is CRI-standard compatible. For iMKE this will be containerd.

Changing the Container Runtime Engine Config

To upgrade from docker to containerd the following steps are needed:

  1. edit the cluster configuration

    edit-cluster-config

  2. change the value of the Container Runtime field from docker to containerd and save the changes

    switch-cre-config

Activating the Config Change

For the change to take effect you need to rotate your worker nodes once. This can be done by either upgrading to a new Kubernetes version or by doing a restart of the rollout of your MachineDeployment. While the prior can be done in the webUI easily (and is already covered by here), the latter will be shown below.

  1. check which container runtime your workers are currently using:

    $ kubectl describe node  | grep "Container Runtime Version"
    Container Runtime Version:  docker://19.3.15
    Container Runtime Version:  docker://19.3.15
    Container Runtime Version:  docker://19.3.15
    

    Here we see in the output that docker is still used as the container runtime.

  2. restart the MachineDeployment by
    1. clicking on the MachineDeployment of the cluster

      choose-machinedeployment

    2. clicking on the restart button

      click-on-restart-button

    3. confirming the restart of the MachineDeployment

      confirm-restart

    Now one after another a new machine will be added and an old machine will be removed after it’s workload has been transferred into the rest of the cluster. After the last old machine has been removed the restart of the MachineDeployment is complete.

  3. now to check again which container runtime powers your worker nodes now:

    $ kubectl describe node  | grep "Container Runtime Version"
    Container Runtime Version:  containerd://1.5.4
    Container Runtime Version:  containerd://1.5.4
    Container Runtime Version:  containerd://1.5.4
    

This concludes the migration of your Kubernetes clusters container runtime from docker to containerd.

Learn More

More background information on the container runtime engines for Kubernetes can be found here: