Day 30 Task: Kubernetes Architecture
Kubernetes Overview
With the widespread adoption of containers among organizations, Kubernetes, the container-centric management software, has become a standard for deploying and operate containerized applications and is one of the most important parts of DevOps.
Originally developed at Google and released as open-source in 2014. Kubernetes builds on 15 years of running Google's containerized workloads and the valuable contributions from the open-source community. Inspired by Googleβs internal cluster management system,
Tasks:
1.What is Kubernetes?
Kubernetes, often abbreviated as K8s (pronounced "kates"), is an open-source container orchestration platform designed to automate the deployment, scaling, management, and maintenance of containerized applications. It was originally developed by Google and is now maintained by the Cloud Native Computing Foundation (CNCF).
The term "K8s" is derived from the word "Kubernetes" by taking the first letter, followed by the number 8, and ending with the last letter. This abbreviation is commonly used in the tech community as a shorthand for Kubernetes, making it easier to type and pronounce.
2.What are the benefits of using k8s?
Benefits of using Kubernetes (K8s):
Container Orchestration: Kubernetes simplifies container management by automating tasks such as deployment, scaling, load balancing, and self-healing.
Portability: Kubernetes abstracts the underlying infrastructure, making applications portable across different cloud providers or on-premises data centers.
Scalability: It enables easy horizontal scaling of applications by adding or removing containers as needed, ensuring optimal resource utilization.
Self-healing: Kubernetes automatically detects and replaces failed containers or nodes, ensuring high availability and minimal downtime.
Service Discovery: It provides built-in service discovery and load balancing to facilitate communication between application components.
Rolling Updates: Kubernetes allows for seamless updates of applications without downtime, reducing disruption to users.
Resource Efficiency: Efficiently manages resources through features like resource quotas, allowing you to control and optimize resource allocation.
Ecosystem: Kubernetes has a thriving ecosystem of tools, extensions, and plugins that enhance its functionality, making it suitable for various use cases.
3.Explain the architecture of Kubernetes
Kubernetes Architecture:
The architecture of Kubernetes is divided into two main components:
Control Plane (Master Node): The control plane is responsible for managing the overall cluster. It consists of several components:
API Server: The API server is the entry point for interacting with the cluster. It exposes the Kubernetes API, which allows users and other components to communicate with the cluster.
Etcd: A distributed key-value store that stores the configuration data and the state of the cluster.
Scheduler: The scheduler is responsible for deciding which nodes (worker machines) should run the pods (containers) based on resource requirements and constraints.
Controller Manager: This component watches the state of the cluster and ensures that the desired state is maintained, automatically making necessary adjustments.
Node (Worker Node): Nodes are the worker machines in the cluster where containers run. Each node has the following components:
Kubelet: The Kubelet is responsible for communicating with the control plane and ensuring that containers are running on the node as expected.
Container Runtime: This is the software responsible for running containers, such as Docker or containerd.
Kube Proxy: Kube Proxy is responsible for maintaining network rules on nodes, allowing network communication to the pods.
Pod: A pod is the smallest deployable unit in Kubernetes, containing one or more containers that share network and storage resources
4.Write the difference between kubectl and kubelets
kubectl
: kubectl
is a command-line tool used for interacting with the Kubernetes cluster's API server. It allows users to perform various management tasks, such as creating, updating, deleting, and inspecting Kubernetes resources like pods, services, and deployments.
kubelet
: kubelet
is an agent that runs on each node in the cluster. It communicates with the control plane and is responsible for ensuring that containers within pods are running in a healthy state on its node. It takes care of container lifecycle management, making sure that containers are started, stopped, and monitored as necessary.
5.Explain the role of the API server.
Role of the API Server:
The API server is a critical component of the Kubernetes control plane. Its primary roles include:
Exposing the Kubernetes API: The API server serves as the entry point for users, administrators, and other components to interact with the cluster. It exposes the Kubernetes API, which allows for the creation, modification, and retrieval of resources within the cluster.
Authentication and Authorization: The API server handles user authentication and authorization, ensuring that only authorized users and components can access and make changes to the cluster.
Validation and Admission Control: It validates and enforces policies on resource configurations, ensuring that they meet specified criteria before they are accepted into the cluster.
Serving Configuration Data: The API server stores and serves the configuration data and the current state of the cluster, which is essential for maintaining the desired state and for communication between components.
Happy Learning :)
If you find my blog valuable, I invite you to like, share, and join the discussion. Your feedback is immensely cherished as it fuels continuous improvement. Let's embark on this transformative DevOps adventure together! π #devops #90daysofdevop #git&github #jenkins #k8s
Subscribe to my newsletter
Read articles from Nilesh Sahare directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Nilesh Sahare
Nilesh Sahare
π I hold a Post Graduate Diploma in Advanced Computing, which has equipped me with a strong foundation in cutting-edge computing technologies like C++ Programming (VS Code editor), MySQL Database (MySQL 8 on both Command Line client and Workbench), Data Structures and Algorithms using Java (Eclipse IDE), HTML 5, CSS 3, JavaScript (VS Code editor), MERN (VS Code editor), Ms.Net Framework with C# Programming (Visual Studio .Net 2019), Software Development Methodologies (SDLC, STLC, JIRA, POSTMAN), JDBC , Servlet, Hibernate, Spring Boot, JSP (J2EE, STS IDE) LINUX Operating system and shell scripting. My academic journey has been marked by a thirst for knowledge and a passion for solving complex problems. π Current Role: Test Engineer | 13 Months and Counting π§ͺ In my current role as a Test Engineer, I thrive on the challenges of ensuring software quality and reliability. Automation and Manual Testing Tools: Selenium, Jira, TestRail, Postman, JUnit, . π οΈ Learning the DevOps Way: Building Bridges π My journey doesn't stop here. I'm on a continuous learning path, actively acquiring knowledge and hands-on experience with DevOps tools streamline collaboration between development and operations teams, encompassing popular solutions like Jenkins for continuous integration, Docker for containerization, Kubernetes for orchestration, Terraform for infrastructure as code, and Git for version control. π€ Let's Connect and Collaborate! π