Why do we need Kubernetes?
Kubernetes allows you to deploy cloud-native applications anywhere and manage them exactly as you like everywhere…With containers, it’s easy to quickly ramp application instances to match spikes in demand. And because containers draw on resources of the host OS, they are much lighter weight than virtual machines.
Kubernetes is vendor-agnostic cluster and container management tool, open-sourced by Google in 2014. It provides a “platform for automating deployment, scaling, and operations of application containers across clusters of hosts”.
What exactly are Containers?
A container is an OS-level virtualization, in which the kernel allows the existence of multiple isolated user-space instances.
In simpler terms, you could say that a container is a fully functional virtual computer, running inside another computer (host). Each container is isolated from other containers, and from the host.
Containers have their own file systems. They can’t see each other’s processes, and their computational resource usage can be bounded. Docker, Containerd, and rkt are examples of container systems.
What is Docker?
Docker provides the ability to package and run an application in a loosely isolated containerized environment. The isolation and security allow you to run many containers simultaneously on a given host.
The isolation and security allow you to run many containers simultaneously on a given host. Containers are lightweight because they don’t need the extra load of a hypervisor, but run directly within the host machine’s kernel. This means you can run more containers on a given hardware combination than if you were using virtual machines.
You can even run Docker containers within host machines that are actually virtual machines!
How Docker & Kubernetes Work Together
Docker is a standalone software that can be installed on any computer to run containerized applications. Containerization is an approach of running applications on an OS such that the application is isolated from the rest of the system. You create an illusion for your application that it is getting its very own OS instance, although there may be other containers running on same system. Docker is what enables us to run, create and manage containers on a single operating system.
Kubernetes turns it up to 11, so to speak. If you have Docker installed on a bunch of hosts (different operating systems), you can leverage Kubernetes. These nodes, or Docker hosts, can be bare-metal servers or virtual machines. Kubernetes can then allow you to automate container provisioning, networking, load-balancing, security and scaling across all these nodes from a single command line or dashboard. A collection of nodes that is managed by a single Kubernetes instance is referred to as a Kubernetes cluster.