What is a Container?
Containers offer a logical packaging mechanism where applications are abstracted from the environment in which they actually run. It provides a standard way to package your application’s code, configurations, and dependencies into a single object. Containers execute resource isolated processes as they share an operating system installed on the server which leads to quick, reliable, and consistent deployments, regardless of the environment.
In simple words, Containers only contain the application, the libraries, frameworks, etc. that they depend on. You can put lots of them on a single host operating system. There is just one operating system installed on the server which is the host operating system and rest all the containers communicate with it. That keeps the containers small and the overhead is extremely low.
Containers are a powerful tool for developing, managing, migrating applications and software components from one system or environment to another. It greatly speeds and enhances cloud computing development.
How is a Container different from Virtual Machines?
The container system is isolated by having an underlying operating system that provides basic service to all applications present in different containers. Whereas, the hypervisor runs multiple VMs that contain their own independent operating system along with the VM hardware support.
Because of this, containers have lower overheads compared to Virtual Machines. Also, container systems provide isolation between containers. As a result, services like file systems or networks can have limited resource access to containers.
Therefore, a Virtual Machine provides an abstract machine that uses drivers targeting the abstract machine, while containerization provides an abstract layer of OS. Ideally, a Virtual Machine would host multiple applications that may change over time and on the other side containers would normally have a single application.
What is Kubernetes?
Kubernetes is a 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”. Above all, this lowers the cost of cloud computing expenses and simplifies operations and architecture.
Note: Kubernetes is not a containerization platform. It is a multi-container management solution.
Let’s get deeper into the basic architecture of Kubernetes
Kubernetes architecture basically consists of three main components:
1. Master nodes
2. Worker nodes
3. Distributed key-value store
What features does Kubernetes come with?
1. Automatic Binpacking: Kubernetes automatically packages your application and schedules the containers based on their requirements and available resources while not sacrificing availability. To ensure complete utilization and save unused resources, Kubernetes balances between critical and best-effort workloads.
2. Service Discovery & Load balancing: With Kubernetes, there is no need to worry about networking and communication because Kubernetes will automatically assign IP addresses to containers and a single DNS name for a set of containers, that can load-balance traffic inside the cluster.
3. Storage Orchestration: With Kubernetes, you can mount the storage system of your choice. You can either opt for local storage, or choose a public cloud provider such as GCP or AWS.
4. Self-Healing: Kubernetes can automatically restart containers that fail during execution and kills those containers that don’t respond to user-defined health checks. But if nodes itself die, then it replaces and reschedules those failed containers on other available nodes.
5. Secret & Configuration Management: Kubernetes can help you deploy and update secrets and application configuration without rebuilding your image and without exposing secrets in your stack configuration.
6. Horizontal Scaling: Kubernetes needs only 1 command to scale up the containers, or to scale them down when using the CLI. Else, scaling can also be done via the Dashboard.
Hoping that this article has highlighted the overview of Containers and Kubernetes.
Thanks for reading.
Stay Tuned till next blog