Kubernetes is a portable, extensible, open source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem. Kubernetes services, support, and tools are widely available.
Kubernetes (k8s) Architecture
below components are the backbone of a Kubernetes cluster, which ensuring that applications run smoothly and efficiently.
Master Node
This is like the captain of the team. It manages the cluster and makes decisions.
etcd
It’s like the memory of the cluster, remembering important details like who’s who and what’s where.
API Server:
It’s like a receptionist for the cluster. It listens for requests and gives instructions to the cluster.
Controller Manager
This is like a supervisor, ensuring everything in the cluster is working as it should be.
Scheduler
It’s like a task manager, deciding where to run applications in the cluster.
Kubelet
Kubelet is like a caretaker for each worker (node) in the cluster. It ensures the containers are running properly.
Container Runtime Interface (CRI)
This is like a translator between Kubernetes and the software that runs the containers, making sure they understand each other.
Kube Proxy (Kubernetes Proxy)
Kube Proxy is like a traffic director, managing communication between applications within the cluster.
Features of Kubernetes (k8s)
Containers
Kubernetes helps manage containers. Think of containers as lightweight, standalone packages that include everything needed to run an application.
Automation
It automates tasks like deploying, scaling, and managing applications. This means less manual work for developers and system administrators.
Scaling
Kubernetes can scale applications up or down based on demand. It ensures that your applications have enough resources to handle traffic spikes and that you’re not wasting resources when demand is low.
Portability
Kubernetes makes it easy to move your applications between different environments, like from laptop to the cloud. This helps with consistency and flexibility.
Orchestration
It acts like a conductor, coordinating multiple containers across multiple machines. This ensures that all parts of your application are working together smoothly.
Fault Tolerance
Kubernetes helps make applications more resilient to failures. If a container or machine fails, Kubernetes can automatically restart or replace it to keep your application running.
Community
Kubernetes has a large and active community of developers and users who contribute to its development and share best practices.
Open Source
It’s an open-source project, meaning anyone can use it and contribute to its development. This fosters innovation and collaboration.
History
Kubernetes was originally developed by Google and later donated to the Cloud Native Computing Foundation (CNCF) in 2015. It was built based on Google’s internal system called Borg.
Popularity
Kubernetes has become one of the most popular container orchestration tools, driving the adoption of cloud-native technologies. It’s widely used by companies of all sizes for deploying and managing applications at scale.
Terminology of Kubernetes
Below are some mostly used terminology and key components of kubernetes(k8s):
Pod
A pod is a small package that holds your application’s containers, along with some basic settings.
Node
A node is like a worker, a computer that runs your applications’ pods.
Cluster
A cluster is a group of worker computers (nodes) managed together.
Deployment
A deployment is like a plan for how your applications should run and how many copies of them you want.
Service
A service is a way for your applications to talk to each other, like a telephone line between them.
Namespace
A namespace is like a folder that helps you organize your applications and resources.
Label
A label is like a sticky note you put on things to organize them. You can use labels to group and find your applications.
Selector
A selector is like a filter that helps you find and manage your applications based on their labels.
Config Map
A Config Map is a place to store settings and configurations for your applications, like a digital notebook.
Secret
A secret is a secure place to store sensitive information like passwords or keys, like a locked diary.
Volume
A volume is like a USB drive attached to your pod. It provides a place for your applications to store and access data.
Label
A label is like a colorful sticker you put on things to group them. You can stick labels on your pods to organize and find them easily.
Selector
A selector is like a search tool that helps you find and manage your applications based on their labels, making it easier to work with groups of pods.
ReplicaSet
A ReplicaSet is like a control panel that ensures a specified number of identical copies (replicas) of your application are running at all times, helping with reliability and availability.
StatefulSet
A StatefulSet is like a specialized ReplicaSet for applications that need to maintain state or identity, such as databases, ensuring consistent and predictable behavior during scaling and updates.
Daemon Set
A Daemon Set ensures that a copy of a specific pod runs on every node in the cluster, useful for system-level tasks like logging or monitoring.
Ingress
An Ingress is like a traffic cop for incoming requests to your applications, managing access and routing based on rules you define.
Persistent Volume
A Persistent Volume is like a reserved parking spot for your application’s data, ensuring it’s available even if the pod moves or restarts.
Persistent Volume Claim
A Persistent Volume Claim is like a request for storage space, allowing your application to access and use Persistent Volumes.
Horizontal Pod Autoscaler (HPA)
HPA automatically adjusts the number of running pods based on CPU or memory usage, ensuring your applications have enough resources to handle varying levels of demand.
Job
A Job is like a one-time task or job that runs to completion, useful for running batch jobs or tasks like data processing.
Cron Job
A Cron Job is like a scheduled task that runs at specified times or intervals, allowing you to automate repetitive tasks like backups or data cleanup.
Custom Resource
A Custom Resource is an extension of Kubernetes API that allows you to define your own object types, tailored to your specific needs or applications.
Helm
Helm is like a package manager for Kubernetes, helping to find, install, and manage applications and resources using pre-configured packages called charts. helm is not actually core component of k8s but widely using to manage application in k8s.
Controller
A Controller is like a control system that watches over specific resources (like pods or services) and ensures they are in the desired state, making adjustments as needed to maintain that state.
Service Account
A Service Account is like an identity card for pods, granting them permissions to access other resources within the cluster.