Is Kubernetes a hypervisor? How do they differ?
Kubernetes, on the surface, appears to perform the same task as a hypervisor. Does that make Kubernetes a hypervisor? The short answer: No. Let's clarify why it's not.
Any hypervisor or Kubernetes admin will say: Of course not. One has nothing to do with the other. But when it's not your daily business to work with either technology, then the question is not a strange one.
How is Kubernetes like a hypervisor?
There are some similarities that might make you think Kubernetes is a hypervisor. With Kubernetes, you can run containers -- with applications -- on a platform with many hosts. That platform then places these workloads on servers to scale up and down easily.
With a hypervisor, something similar is done to run VMs -- running applications -- on multiple hosts. These are also placed according to workload use and can scale up and down easily.
To answer the direct question, we must first clarify that Kubernetes itself does not run workloads. A container engine, such as Docker, performs that task. Kubernetes then places the containers on hosts, where the container engine executes them.
Rather than ask if Kubernetes is a hypervisor, the better question is if container engines are hypervisors. In reality, most people don't see a demonstrable difference between the two. When running Kubernetes, it seems that the software itself is doing all the heavy lifting.
Why isn't Kubernetes a hypervisor?
The main difference between containers and VMs is that VMs use virtual hardware. The way VMs run on the physical hardware is also different.
With a hypervisor, each VM has a set of virtual hardware that requires a full OS inside the machine to manage that hardware. Using that software requires a storage adapter driver and network card driver, for example.
Containers running in a container engine such as Docker run on top of an OS. That OS manages the hardware; all deployed containers use the same underlying system. In a container, the underlying OS handles networking. In addition, containers don't require a virtualized network adapter, which a VM does.
Final answer: Kubernetes and containers are not hypervisors, despite similar appearances on the surface.
Dig Deeper on Containers and virtualization
Related Q&A from Rob Bastiaansen
How do you enable centralized vCenter logging?
Centralize vCenter log files with vRealize Log Insight. Configuration with vSphere is simple and enables the centralization and transmission of event... Continue Reading
How do you reconfigure access to a VMkernel port?
Use ESXi firewall configuration settings and VMkernel ports to control the levels of access that different services, such as Secure Shell, have to ... Continue Reading
How do you prevent host isolation during network maintenance?
The host in a VMware high availability cluster uses a heartbeat network that can incorrectly report host isolation. Reconfigure your settings to ... Continue Reading