5

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.

Marc Wittke
  • 2,991
  • 2
  • 30
  • 45
Vololodymyr
  • 1,996
  • 5
  • 26
  • 45

3 Answers3

5

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, execute the following commands.

  3. microk8s stop

  4. microk8s start

Jaiber
  • 66
  • 1
  • 3
3

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

Arghya Sadhu
  • 41,002
  • 9
  • 78
  • 107
  • 1
    So I think it's means I can easily use docker images using containerd engine. And my question doesn't make sense? – Vololodymyr Apr 09 '20 at 11:33
  • yes you can absolutely do that...kubernetes abstracts the container runtime from you so that you don't need to worry...now microk8s does not offer the ability to choose different OCI runtimes...you can use kubeadm if you want to have a choice around OCI runtimes – Arghya Sadhu Apr 09 '20 at 11:37
-2

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.

Nick
  • 1,882
  • 11
  • 16