Do I need Docker for Kubernetes?

7/2/2018

Scenario:

I need to build a web-app, from which I can run/sop/delete/etc. containers in a cluster. So I installed Kubernetes and tested the API from the console. Everything seems working and looks fine.

Following the Docs, they write about Docker, but do I need it necessarily?

I mean I had to disable Hyper-V to make Minikube work, and after a reboot, Docker (which usually starts at startup) says that "something went wrong.. bla bla" .. but I can create deployments and proxys on Minikube.
This is somehow confusing.

Can someone explain this please for dummies?

-- Adolf H
docker
kubernetes
minikube

3 Answers

7/2/2018

If you're running minikube on OSX or Linux, you can configure Docker to use the minikube environment by running

eval $(minikube docker-env)

When you do this, you don't need a separate Docker desktop application. You're still technically using both Docker and Kubernetes, but you won't be using the setup with the "whale" icon on OSX.

Fundamentally Kubernetes takes responsibility for launching and managing Docker containers. (Or potentially other things, but almost always Docker containers.) It's a more complicated and more powerful tool along the same lines as Docker Compose and Docker Swarm. Minikube is very small Kubernetes cluster that runs inside a virtual machine; if you run kubectl get nodes you will see the single VM node, and that includes a copy of Docker.

-- David Maze
Source: StackOverflow

7/2/2018

Technically, you need a container runtime which respects CRI (Container Runtime Interface).

https://d3vv6lp55qjaqc.cloudfront.net/items/0I3X2U0S0W3r1D1z2O0Q/Image%202016-12-19%20at%2017.13.16.png

That is why you have CRI-O, which provides an integration path between OCI conformant runtimes and the kubelet.
See "CRI-O, the Project to Run Containers without Docker, Reaches 1.0" by Susan Hall.

The project “opens the door for plugging alternative container runtimes in the kubelet more easily, instead of relying on the default docker runtime.

Those new runtimes may include virtual machines-based ones, such as runv and Clear Containers, or standard Linux containers runtimes like rkt,” Red Hat senior engineer Antonio Murdaca wrote on the Project Atomic blog.


But in your case, your issue is to make Minikube work with HyperV: see "Minikube on Windows 10 with Hyper-V" from Jock Reed.
The trick is to create a new (External) Virtual network switch, named "Primary Virtual Switch", and to start Minikube with:

minikube start --vm-driver hyperv --hyperv-virtual-switch "Primary Virtual Switch"
-- VonC
Source: StackOverflow

7/3/2018

As mentioned above, you need any runtime container. Kubernetes and docker are part of ecosystem. Both have different responsibilities, kubernetes handle cluster health and docker run application containers.

-- Akash Sharma
Source: StackOverflow