Day 30 Task: Kubernetes Architecture
Demystifying Kubernetes: Unveiling the Architecture and Components
Table of contents
- 🔶 Kubernetes Overview
- 🔶 Tasks 1: What is Kubernetes? Write in your own words and why do we call it k8s?
- 🔶 Tasks 2: What are the benefits of using k8s?
- 🔶 Tasks 3: Explain the architecture of Kubernetes, refer to this video
- 🔶 Tasks 4: What is Control Plane?
- 🔶 Tasks 5: Write the difference between kubectl and kubelets.
- 🔶 Tasks 6: Explain the role of the API server.
🔶 Kubernetes Overview
With the widespread adoption of containers among organizations, Kubernetes, the container-centric management software, has become a standard to deploy 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, Borg,
🔶 Tasks 1: What is Kubernetes? Write in your own words and why do we call it k8s?
✦ Kubernetes is an open-source platform that automates the management of containerized applications, ensuring they run reliably, scale easily and are easy to deploy and manage across different environments.
"K8s" is a shorthand or abbreviation for "Kubernetes." The name "Kubernetes" has 10 letters between "K" and "s." By using "K8s," the number 8 replaces the character "ubernete," making it shorter and easier to type, while still being recognizable as referring to Kubernetes. This abbreviation is commonly used in conversations, documentation, and online discussions for convenience.
🔶 Tasks 2: What are the benefits of using k8s?
✦ Using Kubernetes (K8s) offers several benefits for managing containerized applications:
Flexibility to scale quickly with business demand: K8s can scale applications up or down based on demand, providing optimal resource utilization.
Portability to run anywhere: Applications can run consistently across different environments, from on-premises to the cloud, ensuring portability.
High availability through self-healing: K8s monitors the health of application components and automatically replaces failed instances, enhancing application reliability.
Load Balancing: It automatically distributes incoming network traffic to ensure even distribution across application instances.
Cost optimization: It involves resource efficiency, auto-scaling, cluster resizing, right-sizing instances, spot instances, resource limits, and efficient networking to reduce expenses and ensure efficient resource utilization.
Multi-cloud Support: It enables deploying applications across multiple cloud providers or on-premises infrastructure.
🔶 Tasks 3: Explain the architecture of Kubernetes, refer to this video
✦ The architecture of Kubernetes consists of several components that work together to manage containerized applications:
Master Node: The control plane manages the cluster and consists of various components:
API Server: Exposes the Kubernetes API and acts as the entry point for all administrative actions.
etcd: A distributed key-value store for storing cluster data and configuration.
Controller Manager: Manages controller processes to regulate the desired state of the system.
Scheduler: Assigns work to nodes based on resource availability and requirements.
Worker Nodes: Also known as minions, these are the nodes where containers run:
Kubelet: Communicates with the control plane and manages containers on the node.
Kube Proxy: Maintains network rules for routing traffic to appropriate containers.
Container Runtime: Software responsible for running containers, such as Docker or containers.
Pods: The smallest deployable units in Kubernetes, containing one or more containers that share network and storage resources.
ReplicaSets: Ensures a specified number of replicas of a pod are running at all times.
Services: Abstracts access to pods using a consistent IP address and load balancing.
Ingress: Manages external access to the services and provides features like SSL termination and routing based on HTTP headers.
ConfigMaps and Secrets: Allow you to manage configuration and sensitive information separately from your container images.
Volumes: Provide persistent storage for data that needs to be shared across containers in a pod.
Namespaces: Logical partitioning of the cluster to manage resources and access control.
Labels and Selectors: Allow for efficient grouping and selection of objects in Kubernetes.
StatefulSets: Manages the deployment of stateful applications with unique identities and stable network identifiers.
Kubernetes components interact to manage containerized applications and ensure high availability, scalability, and automated management of resources.
🔶 Tasks 4: What is Control Plane?
✦ The control plane in Kubernetes refers to the set of components that manage and control the overall behavior of the cluster. It acts as the brain of the cluster, making high-level decisions and orchestrating the deployment, scaling, and management of applications and resources. The control plane's main responsibility is to maintain the desired state of the cluster by continuously monitoring, reacting to changes, and ensuring that the actual state matches the declared desired state.
Key components of the Kubernetes control plane include:
API Server
etcd
Scheduler
Controller Manager
🔶 Tasks 5: Write the difference between kubectl and kubelets.
✦ kubectl:
kubectl
is a command-line tool used to interact with and manage Kubernetes clusters.It is mainly used by administrators, developers, and operators to manage applications, view cluster information, create resources, and perform various cluster operations.
It communicates with the Kubernetes API server to execute commands and retrieve information about the cluster.
kubelet:
kubelet
is an agent that runs on each node in the Kubernetes cluster.It is responsible for ensuring that containers are running in a pod on a node, and it communicates with the control plane to report the node's status and any changes.
kubelet is needed to install in worker nodes.
🔶 Tasks 6: Explain the role of the API server.
✦ The API Server in Kubernetes is a central component that exposes the Kubernetes API, enabling communication with the cluster. It handles requests for resource management, authentication, and authorization, and interacts with the control plane components and etcd to maintain the cluster's state and configuration.
Kubernetes architecture is important, so make sure you spend a day understanding it. This video will surely help you.
Happy Learning :)
Stay in the loop with my latest insights and articles on cloud ☁️ and DevOps ♾️ by following me on Hashnode, LinkedIn (https://www.linkedin.com/in/chandreshpatle28/), and GitHub (https://github.com/Chandreshpatle28).
Thank you for reading! Your support means the world to me. Let's keep learning, growing, and making a positive impact in the tech world together.
#Git #Linux Devops #Devopscommunity #90daysofdevopschallenge #python #docker #Jenkins #Kubernetes