Is it possible to set microk8s to use docker engine instead of containerd?

Viewed 3276

First of all, I am not an expert in container orchestration tools.

I've just installed microk8s according to the guide: https://microk8s.io/docs/

And if I run microk8s kubectl get nodes, I see, that my node is actually running containerd engine.

My application build process is set up to generate docker file and automatically create docker images, so I would like microk8s also use docker.

I used minikube before, and now I decided to try microk8s. Now I am a bit confused, maybe it was a bad idea to stick with docker from the beginning?

Is it possible to set a docker engine for microk8s?


I've never used contained before, and I don't know how to prepare contained images for my app. That's why I am asking.

3 Answers

To run Nvidia GPU enabled containers, I had to switch from containerd to docker in microk8s. Here's how I did that:

  1. Edit /var/snap/microk8s/current/args/kubelet

  2. Change --container-runtime=docker from remote. Then,

$ microk8s stop

$ micrk8s start

You don't need specifically docker to run pods using docker images on kubernetes.Any OCI standard runtime such as containerd, docker, CRI-O etc as OCI runtime can run docker images because they all follow same OCI standard.

microk8s does not offer the ability to choose from different OCI runtimes

First of all, I am not an expert in container orchestration tools.

MicroK8s is just a single snap package that can be installed on Ubuntu, as well as other Linux distributions. MicroK8s is easy to install and has a small disk and memory footprint, making it a good entry point for those interested in exploring K8s.

As you know, the container needs a runtime engine; while the Docker is the most common container runtime used in a Pod, Pods can use other container runtime engines, such as CoreOS rkt, etc, etc if desired. For a container itself it makes no difference. That's the whole idea of that approach.

You can easily run your containers on microk8s.

Hope that helps.

Related