Assignment 8: Submitted by
Assignment 8: Submitted by
Assignment 8
Aim : Setup Single Node Kubernetes Cluster with Minikube and Deploy an
web app on kubernets cluster
Theory :
What is Kubernetes?
Kubernetes is an open-source container orchestration platform originally
developed by Google and now maintained by the Cloud Native Computing
Foundation (CNCF). It automates the deployment, scaling, and management of
containerized applications. With Kubernetes, you can deploy your applications
in containers (like Docker containers) and efficiently manage those containers at
scale.
Kubernetes provides a platform-agnostic framework, allowing you to run your
applications on any infrastructure, be it on-premises, in the cloud, or a hybrid of
both. It abstracts away the underlying infrastructure complexities and provides a
consistent interface for deploying and managing containerized applications.
What is the need for Kubernetes?
Kubernetes addresses several challenges associated with deploying and
managing containerized applications at scale. Some of the key needs that
Kubernetes fulfills include:
Orchestration : Kubernetes automates the deployment, scaling, and
management of containerized applications, freeing developers from
manual intervention.
Scalability : It enables you to easily scale your applications up or
down based on demand, ensuring optimal resource utilization.
High Availability : Kubernetes ensures that your applications are
highly available by automatically restarting failed containers and
distributing workloads across multiple nodes.
Portability : Kubernetes provides a platform-agnostic framework,
allowing you to deploy your applications consistently across different
environments, including on-premises data centers, public clouds (like
AWS, Azure, or GCP), and hybrid environments.
Resource Efficiency : Kubernetes optimizes resource utilization by
efficiently scheduling containers onto nodes based on available resources
and workload requirements.
Service Discovery and Load Balancing : Kubernetes provides built-in
mechanisms for service discovery and load balancing, making it easier to
connect and route traffic to your applications.
Kubernetes Components :
Kubernetes architecture consists of several components, each with specific roles
and responsibilities:
Master Components :
API Server : Exposes the Kubernetes API, which allows clients to
interact with the Kubernetes control plane.
Scheduler : Assigns nodes to newly created pods based on
resource requirements and constraints.
Controller Manager : Runs controller processes that regulate the state
of the cluster, such as node and pod replication controllers.
etcd : Consistent and highly available key-value store used as Kubernetes'
backing store for all cluster data.
Node Components :
Kubelet : An agent that runs on each node and is responsible for
managing the containers and ensuring they are running as
expected.
Kube-proxy : Maintains network rules on nodes, enabling
communication between pods and external traffic.
Container Runtime : The software responsible for running
containers, such as Docker, containerd, or CRI-O.
Add-ons :
DNS : Provides DNS-based service discovery for Kubernetes services.
Dashboard : A web-based UI for managing and monitoring
Kubernetes clusters.
Ingress Controller : Manages external access to services within a
cluster, typically through HTTP/HTTPS routing.
Ingress : Ingress is an API object that manages external access to services within a
Kubernetes cluster. It provides HTTP and HTTPS routing to services
based on hostnames and paths, allowing you to expose multiple services
through a single external endpoint.
Step 6 : Deploy
Step 7 : Access the application
Conclusion : Deploying a web application using Kubernetes offers unparalleled
scalability, reliability, and efficiency. Leveraging Kubernetes' container
orchestration capabilities streamlines deployment processes, enhances resource
utilization, and ensures seamless management of containerized applications,
marking a significant advancement in modern software deployment
methodologies.