Kubernetes also known as K8s was developed by Google based on maintaining their application container in production. Kubernetes is now opensource and one of the best container orchestration technology. We need to understand about the Container and Orchestration to understand about Kubernetes.
What is Container?
A Container is a standard unit of software packages up code and all its dependencies, so the application runs quickly and reliably from one computing environment to another. Docker is the container based, industry best software. Docker container is lightweight, standalone, executable package of software that includes everything needed to run an application such as code, runtime, system tools, system libraries and settings.
Container images become containers at runtime and in the case of Docker containers, image become container when they run on Docker Engine. Docker container that runs on Docker Engine,
- Standard: Docker created the industry standards for Containers, so they could be portable anywhere.
- Lightweight: Containers share the machine OS system kernel, so does not require OS per application.
- Secure: Docker provides the strongest default isolation capabilities in the industry and applications are safer in containers.
What is Docker Engine?
Docker Engine is the industry’s actual container runtime that runs on various Linux and Windows Server Operating system. Docker engine enables containerized applications to run anywhere consistently on any infrastructure. This reduces the dependency hell for developer and operation teams.
Why do we need Docker Containers?
As shown in the below diagram, there could be the dependencies between applications and its underlying software which is using to run. There could be many chances of raising problems with infrastructural and dependencies issues.
That’s where docker helps us to containerize each and every application into individual containers. Each individual container contains its dependent code, dependencies, system configurations, etc. So, they run any where.
If you observed the difference between above two images, image without Docker shown the common library and dependencies which is shared across multiple applications. Image with Docker will clearly shows that each individual docker container contains it’s libraries and Dependencies. So, with docker there is not chance of getting the problems related to libraries and dependencies and there is no chance of saying it works in my machine.
What is Container Orchestration?
Automatically managing and scaling (increasing or decreasing) container instances dynamically based on the load is called as Container Orchestration.
Container Orchestration Technologies:
Kubernetes is one of the most popular Docker Container Orchestration technologies.
- Docker Swarm is from Docker and its easy to setup and start but not up to the mark to support large scale applications.
- Kubernetes is from Google and it is bit difficult to setup but supports lot of options to customize and support deployments. Kubernetes project is one of the top ranked project in GitHub.
- MESOS is from Apache and is bit difficult to setup but supports many advanced features.