Kubernetes Why Do We Need Containers
Kubernetes Why Do We Need Containers
Today's internet user never accept downtime. Therefore developers have to find a
method to perform maintenance and update without interrupting their services.
Therefore container, which is isolated environments. It includes everything
needed for application to run. It makes it easy for a developer to edit and
deploying apps. Moreover, containerization has become a preferred method for
packaging, deploying, and update web apps.
What is Kubernetes
Kubernetes is the Linux kernel which is used for distributed systems. It helps you
to be abstract the underlying hardware of the nodes(servers) and offers a
consistent interface for applications that consume the shared pool of resources.
Features of Kubernetes
Automated Scheduling
Self-Healing Capabilities
Automated rollouts & rollback
Horizontal Scaling & Load Balancing
Offers environment consistency for development, testing, and production
Infrastructure is loosely coupled to each component can act as a separate
unit
Provides a higher density of resource utilization
Offers enterprise-ready features
Application-centric management
Auto-scalable infrastructure
You can create predictable infrastructure
Kubernetes Basics
Cluster:
Master:
Node:
Namespace:
Master Node
The master node is the first and most vital component which is responsible for
the management of Kubernetes cluster. It is the entry point for all kind of
administrative tasks. There might be more than one master node in the cluster to
check for fault tolerance.
The master node has various components like API Server, Controller Manager,
Scheduler, and ETCD. Let see all of them.
API Server: The API server acts as an entry point for all the REST commands
used for controlling the cluster.
Scheduler
The scheduler schedules the tasks to the slave node. It stores the resource usage
information for every slave node. It is responsible for distributing the workload.
It also helps you to track how the working load is used on cluster nodes. It helps
you to place the workload on resources which are available and accept the
workload.
etcd
Worker/Slave nodes
Worker nodes are another essential component which contains all the required
services to manage the networking between the containers, communicate with
the master node, which allows you to assign resources to the scheduled
containers.
Kubelet: gets the configuration of a Pod from the API server and ensures
that the described containers are up and running.
Docker Container: Docker container runs on each of the worker nodes,
which runs the configured pods
Kube-proxy: Kube-proxy acts as a load balancer and network proxy to
perform service on a single worker node
Pods: A pod is a combination of single or multiple containers that logically
run together on nodes
Replication Controllers
Replication sets
Stateful Sets
Daemon Sets
Daemon sets are another specialized form of pod controller that runs a copy of a
pod on every node in the cluster. This type of pod controller is an effective
method for deploying pods that allows you to perform maintenance and offers
services for the nodes themselves.
Disadvantages of Kubernetes