Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I need Docker for Kubernetes?

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?

like image 367
Adolf H Avatar asked Jul 02 '18 20:07

Adolf H


People also ask

Is Docker must for Kubernetes?

Can You Use Docker Without Kubernetes? The short and simple answer is yes, Docker can function without Kubernetes. You see, Docker is a standalone software designed to run containerized applications. Since container creation is part of Docker, you don't need any separate software for Docker to execute.

Why does Kubernetes use Docker?

For development, this provides an essential advantage: Kubernetes can create containers from images stored in the Docker Engine image cache. We can build images locally and test them right away without having to push them to a registry first.


1 Answers

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"
like image 121
VonC Avatar answered Oct 11 '22 15:10

VonC