Kubernetes Overview
With the widespread adoption of containers among organizations, Kubernetes, the container-centric management software, has become a standard to deploy and operating 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
What is Kubernetes? Write in your own words and why do we call it k8s?
Kubernetes is open open-source container orchestration platform. It makes it easier to deploy and manage applications. It also enables to autoscale the application based on requirements.
K8's is simply shortened to Kubernetes. The number 8 represents the number of letters skipped between the "K" and the "s" in the word "Kubernetes".
What are the benefits of using K8s?
The benefits of using Kubernetes (k8s) :
Run applications in containers efficiently.
Keep applications up and running even if a node fails.
Easily deploy and update applications.
Scale applications to meet demand.
Improve security for applications.
Run applications in different environments with ease.
Explain the architecture of Kubernetes.
Master Node: The Master node acts as the control center for the cluster, managing the desired state of the cluster and ensuring that the actual state matches the desired state.
Worker Nodes: Worker nodes are where your application containers run. They communicate with the Master node to receive instructions and report their status.
etcd : etcd is a distributed key-value store that stores the configuration data for the cluster.
API Server : The API Server is the main interface for communication between the Master node and the worker nodes. It exposes the Kubernetes API, which can be used to manage the cluster and deploy applications.
Controller Manager: The Controller Manager is responsible for running various controllers that regulate the state of the cluster, such as the replication controller and endpoints controller.
Scheduler: The Scheduler is responsible for assigning pods to worker nodes based on resource requirements and constraints.
kubelet : kubelet is a process running on each worker node that communicates with the Master node to receive instructions and ensure the containers are running as intended.
kubectl : kubectl is the command-line interface for interacting with the Kubernetes API.
4. What is a Control Plane?
The Control Plane manages the worker nodes and the Pods in the cluster. In production environments, the control plane usually runs across multiple computers and a cluster usually runs multiple nodes, providing fault-tolerance and high availability. Components of the Control Plane include API server, etcd, scheduler, and controller manager.
5. Write the difference between kubectl and kubelets
kubectl is the command-line interface (CLI) tool for working with a Kubernetes cluster. It communicates with the API server to perform various operations on the cluster, such as deploying applications, scaling resources, and inspecting logs.
Kubelet is the technology that applies, creates, updates, and destroys containers on a Kubernetes node.
6. Explain the role of the API server.
The API server is a main component of Kubernetes that enables users and applications to interact with and manage resources. All administrative operations, including creating, updating, and deleting resources like pods, services, deployments, and namespaces, are initiated by sending API requests to the API server. API Server is also responsible for the authentication and authorization mechanism. All API clients should be authenticated in order to interact with the API Server. REST operations validate them, and update the corresponding objects in etcd.
Happy Learning!