Several containers such as Linux container, docker container or any of them, they package the application and isolate them from the host. This makes the container faster, reliable, efficient, light-weight and scalable.
But apart from being light-weight or scalable containers lead to issues like they could not communicate with each other, containers had to be deployed appropriately, they had to be managed carefully, auto-scaling was not possible with containers, distributing traffic was still challenging.
These problems were overcome by Kubernetes.
What is Kubernetes?
Kubernetes is an open-source container management tool which automates container deployment, container de-scaling and container load balancing. The benefits of it is that it works well with all cloud windows with all public, hybrid, on-premise cloud vendors.
Kubernetes has a huge community because it was first developed by Google and later donated to CNCF.
K8â€™s can group â€˜nâ€™ number of containers into one logical unit for managing and deploying them easily.
Features of Kubernetes:
- Automatic Binpacking: k8â€™s packages your application and it automatically places containers based on their requirements and resources that are available.
- Service discovery and load balancing: In k8â€™s there is no need to worry about networking and communication because k8â€™s will automatically assign containers their own IP addresses and single DNS name for a set of containers which are performing a logical operation.
- Storage Orchestration: With k8â€™s you can automatically mount your storage system of your choice either a local storage or public cloud provider such as DCP or AWS or even a network storage system.
- Self-Healing: Whenever k8â€™s realizes that one of your containers has failed then it will restart that container on its own and can create a new container in place of crashed one.
- Batch Execution: K8â€™s manages batch and CI workloads which is a DevOps. It replaces your containers which fails and can restart and restore the original state.
- Secret and configuration management: You can deploy and update your secrets and application configuration without having to rebuild your entire image.
- Horizontal Scaling: K8â€™s can scale your application up and down with simple command that can be run on CLI or on GUI i.e., on dashboard or K8â€™s dashboard.
- Automatic Rollbacks and Rollouts: Whenever there is an update to your application which you want to release, K8â€™s progressively rollouts these changes and updates to the application or its configurations by ensuring that one instance after another sent updates.
Architecture of Kubernetes:
Fig: Architecture of Kubernetes
The first step here is to create a master which is the first step in creating the cluster. Then get the nodes to join those clusters. Either the pods or containers, everything would be running in nodes.
The K8â€™s masters can only be scheduling or replicating these containers across all these nodes, making sure the configuration satisfied.
There are two ways to access the K8â€™s master. By UI or by CLI, the CLI is the default way and it is a main way technically because when a user starts to set-up the cluster, they can use CLI and from this user can enable the dashboard. Once the dashboard gets enabled user probably get the GUI and start using K8â€™s deploying with the help of dashboard.
K8â€™s Master controls the node and inside nodes there were containers inside them. Containers are inside a separate PODS.
PODS are logical collection of containers which need to interact with each other for an application.
Replication Controller is masterâ€™s resource to ensure that requested number of PODS are running on nodes always.
Service is an object on master that provides load balancing across a replicated group of PODS.
The portable, being an open-source platform, Kubernetes manages the containerized workloads and services that ease the configuration and automation. The blog gives you an overall idea of what K8â€™s is and how it works.