0% found this document useful (0 votes)
26 views14 pages

Unit III Kubernetes

Kubernetes is an open-source platform that automates deployment, scaling, and operations of containerized applications. It groups related containers into pods that can be managed and scaled together. The Kubernetes architecture includes a master node that manages the cluster state and scheduling of pods to worker nodes, which run the pod containers. Key Kubernetes objects include pods, services for load balancing, replica sets for availability, and namespaces for isolation.

Uploaded by

PJ Dude
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views14 pages

Unit III Kubernetes

Kubernetes is an open-source platform that automates deployment, scaling, and operations of containerized applications. It groups related containers into pods that can be managed and scaled together. The Kubernetes architecture includes a master node that manages the cluster state and scheduling of pods to worker nodes, which run the pod containers. Key Kubernetes objects include pods, services for load balancing, replica sets for availability, and namespaces for isolation.

Uploaded by

PJ Dude
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Kubernetes

Going back in time


Container deployment era
• Containers are similar to VMs, but they have relaxed isolation properties to share
the Operating System (OS) among the applications.
• Therefore, containers are considered lightweight.
• Similar to a VM, a container has its own filesystem, share of CPU, memory,
process space, and more.
• As they are decoupled from the underlying infrastructure, they are portable
across clouds and OS distributions.
Benefits of Containers
• Containers have become popular because they provide extra benefits, such as:
• Agile application creation and deployment: increased ease and efficiency
of container image creation compared to VM image use.
• Continuous development, integration, and deployment: provides for
reliable and frequent container image build and deployment with quick and
efficient rollbacks (due to image immutability).
• Dev and Ops separation of concerns: create application
container images at build/release time rather than deployment
time, thereby decoupling applications from infrastructure.
• Observability: not only surfaces OS-level information and metrics,
but also application health and other signals.
Benefits of Containers
• Environmental consistency across development, testing, and production: runs
the same on a laptop as it does in the cloud.
• Cloud and OS distribution portability: runs on Ubuntu, RHEL, CoreOS, on-
premises, on major public clouds, and anywhere else.
• Application-centric management: raises the level of abstraction from running
an OS on virtual hardware to running an application on an OS using
logical resources.
• Loosely coupled, distributed, elastic, liberated micro-services: applications are
broken into smaller, independent pieces and can be deployed and managed
dynamically – not a monolithic stack running on one big single-
purpose machine.
• Resource isolation: predictable application performance.
• Resource utilization: high efficiency and density.
Why you need Kubernetes and what it can do
• Containers are a good way to bundle and run your applications.
• In a production environment, you need to manage the containers that run the
applications and ensure that there is no downtime.
• For example, if a container goes down, another container needs to start.
Wouldn't it be easier if this behavior was handled by a system?
• That's how Kubernetes comes to the rescue!
• Kubernetes provides you with a framework to run distributed systems resiliently.
• It takes care of scaling and failover for your application, provides deployment
patterns, and more.
• For example: Kubernetes can easily manage a canary deployment for your
system.
What is Kubernetes?

• Kubernetes is also known as 'k8s'. This word comes from the Greek language, which means
a pilot or helmsman.

• Kubernetes is an extensible, portable, and open-source platform designed by Google in 2014.


• Kubernetes is an open-source system that automates the management,
scaling, and deployment of containerized applications.
• It is mainly used to automate the deployment, scaling, and operations of the container-based applications
across the cluster of nodes.
• It is also designed for managing the services of containerized apps using different methods which provide
the scalability, predictability, and high availability.
• It is actually an enhanced version of 'Borg' for managing the long-running processes and batch jobs.
• Nowadays, many cloud services offer a Kubernetes-based infrastructure on which it can be deployed as the
platform-providing service.
• This technique or concept works with many container tools, like docker, and follows the client-server
architecture.
Key Objects of Kubernetes
• Pod
• Kubernetes groups multiple containers into a single atomic unit called a Pod. It is the smallest
and simplest basic unit of the Kubernetes application. This object indicates the processes
which are running in the cluster.
• Node
• A node is nothing but a single host, which is used to run the virtual or physical machines. A
node in the Kubernetes cluster is also known as a minion.
• Service
• A service in a Kubernetes is a logical set of pods, which works together. With the help of
services, users can easily manage load balancing configurations.
• ReplicaSet
• ReplicaSet in the Kubernetes is used to identify the particular number of pod replicas are
running at a given time. It replaces the replication controller because it is more powerful and
allows a user to use the "set-based" label selector.
• Namespace
• Kubernetes supports various virtual clusters, which are known as namespaces. It is a way of
dividing the cluster resources between two or more users.
Features of Kubernetes
• Pod: It is a deployment unit in Kubernetes with a single Internet protocol address.
• Horizontal Scaling: It is an important feature in the Kubernetes. This feature uses
a HorizontalPodAutoscalar to automatically increase or decrease the number of pods in a deployment,
replication controller, replica set, or stateful set on the basis of observed CPU utilization.
• Automatic Bin Packing: Kubernetes helps the user to declare the maximum and minimum resources of
computers for their containers.
• Service Discovery and load balancing: Kubernetes assigns the IP addresses and a Name of DNS for a set of
containers, and also balances the load across them.
• Automated rollouts and rollbacks: Using the rollouts, Kubernetes distributes the changes and updates to an
application or its configuration. If any problem occurs in the system, then this technique rollbacks those
changes for you immediately.
• Persistent Storage: Kubernetes provides an essential feature called 'persistent storage' for storing the data,
which cannot be lost after the pod is killed or rescheduled. Kubernetes supports various storage systems for
storing the data, such as Google Compute Engine's Persistent Disks (GCE PD) or Amazon Elastic Block Storage
(EBS). It also provides the distributed file systems: NFS or GFS.
• Self-Healing: This feature plays an important role in the concept of Kubernetes. Those containers which are
failed during the execution process, Kubernetes restarts them automatically. And, those containers which do
not reply to the user-defined health check, it stops them from working automatically.
Features of Kubernetes
Kubernetes Architecture

• The architecture of
Kubernetes actually follows the
client-server architecture.
It consists of the following two
main components:
• Master Node (Control Plane)
• Slave/worker node
Master Node or Kubernetes Control Plane

• The master node in a Kubernetes architecture is used to manage the states of a


cluster. It is actually an entry point for all types of administrative tasks. In the
Kubernetes cluster, more than one master node is present for checking the fault
tolerance.
• Following are the four different components which exist in the Master node or
Kubernetes Control plane:
• API Server
• Scheduler
• Controller Manager
• ETCD
Master Node or Kubernetes Control Plane
• API Server
• The Kubernetes API server receives the REST commands which are sent by the user. After receiving, it
validates the REST requests, process, and then executes them. After the execution of REST commands,
the resulting state of a cluster is saved in 'etcd' as a distributed key-value store.
• Scheduler
• The scheduler in a master node schedules the tasks to the worker nodes. And, for every worker node, it
is used to store the resource usage information.
In other words, it is a process that is responsible for assigning pods to the available worker nodes.
• Controller Manager
• The Controller manager is also known as a controller. It is a daemon that executes in the non-terminating
control loops. The controllers in a master node perform a task and manage the state of the cluster. In the
Kubernetes, the controller manager executes the various types of controllers for handling the nodes,
endpoints, etc.
• ETCD
• It is an open-source, simple, distributed key-value storage which is used to store the cluster data. It is a
part of a master node which is written in a GO programming language.
Worker/Slave node
• The Worker node in a Kubernetes is also known as minions. A worker node is a physical
machine that executes the applications using pods. It contains all the essential services
which allow a user to assign the resources to the scheduled containers.
• Following are the different components which are presents in the Worker or slave node:
• Kubelet
• This component is an agent service that executes on each worker node in a cluster. It ensures that the
pods and their containers are running smoothly. Every kubelet in each worker node communicates with
the master node. It also starts, stops, and maintains the containers which are organized into pods directly
by the master node.
• Kube-proxy
• It is a proxy service of Kubernetes, which is executed simply on each worker node in the cluster. The main
aim of this component is request forwarding. Each node interacts with the Kubernetes services
through Kube-proxy.
• Pods
• A pod is a combination of one or more containers which logically execute together on nodes. One worker
node can easily execute multiple pods.

You might also like