Im using minikube, it shows container engine is "docker". But in kubernetes v1.2 . . .

z0x0z:
im using minikube, it shows container engine is “docker”. But in kubernetes v1.24 support for docker is removed right? then how this is possible?

Nimesha Jinarajadasa:
However, when we say “Docker” in this context, it’s important to distinguish between Docker as a whole and Docker as a container runtime (Docker-shim). Docker is a platform that uses containerd as its container runtime, but it also provides many other features like image building, user interface, etc. When Kubernetes says it’s deprecating Docker, it’s referring to Docker-shim

z0x0z:
@Nimesha Jinarajadasa I’m confused with Container runtimes…

  1. If I install Docker Desktop alone without k8s and start using docker then what will be the container runtime?
  2. If i use Docker Desktop along with minikube then container engine is shown as Docker engine version 20.10.23 (refer above image), which means what container runtime now being used?

Nimesha Jinarajadasa:
If you install Docker Desktop alone without Kubernetes and start using Docker, the container runtime is containerd.

However, if you’re using Minikube on Docker Desktop, the “container engine” you’re seeing is actually the “driver” that Minikube uses to run its VMs. Minikube supports several drivers such as VirtualBox, VMWare, Hyper-V, and Docker. When you’re using the Docker driver, Minikube creates a Docker container and sets up the Kubernetes cluster inside it. The container runtime used by the Kubernetes cluster inside Minikube can be different and is determined by the --container-runtime flag when you start Minikube. By default, it’s Docker (through Docker-shim), but it can also be set to containerd, cri-o, or any other CRI-compliant runtime.

Nimesha Jinarajadasa:
https://docs.docker.com/get-started/overview/#docker-architecture

https://minikube.sigs.k8s.io/docs/drivers/
https://minikube.sigs.k8s.io/docs/handbook/config/#container-runtime

z0x0z:
@Nimesha Jinarajadasa I did not set --container-runtime flag when I start minikube. So it would have took default container runtime which is Docker (Docker-shim). But if u see the image k8s version is 1.26 which does not have docker-shim support. In this case what runtime will it run on?

Alistair Mackay:
You don’t need to.

Docker provides a virtual machine in which to run the entire minikube ecosystem. Minikube itself still uses containerd to run pods. It is effectively containers running inside a container (nested containers).

As pointed out by Nimesha, docker is only one option for running minikube. It can run inside a virtual machine also.

As far as minikube is concerned, it is running on its own private Linux machine. This Linux machine can be provided either by Docker, or by virtualization software (VMware, Hyper-V, VirtualBox etc)

There is nothing particularly special about minikube compared with full-blown kubernetes. It’s “mini” because it’s kubernetes packaged up in a little box that’s easy to create and then completely wipe out leaving no trace - and because you can only run small workloads (memory, CPU and disk constraints of the docker container or VM you run the cluster in).

It was created for learning and testing. You’d never use it for production workloads.