Kubernetes (K8s) is an open-source container orchestration platform that help to automate the deployment, scaling, and management of containerized applications.
- Companies moved from physical servers → VMs → containers → Kubernetes to make applications run faster, more efficient (optimize resources usage), and easier to manage at scale.
- companies are moving from monolithic app to microservices architecture increasing the usage of containers and the need to efficiently manage them in various environments.
Kubernetes has a Control plane - Worker architecture:
The control plane manages the worker nodes and the pods in the cluster. It contains:
- API Server – Entry point for commands (talks to users & other parts).
- Scheduler – Decides where to run new containers.
- Controller Manager – Handles tasks like scaling & failures.
- etcd – Stores all cluster data (like a database).
- Cloud controller manager - ( for cloud cluster. this is in case kubernetes needs to create ressources in the cloud )
- Kubelet – Talks to the control plane to run and manage containers.
- Container Runtime – Runs containers (e.g., Docker, containerd).
- Kube Proxy – Manages network communication between containers.
NB: control plane node also has kubelet, kube-proxy and container runtime because it runs some system pods
Smallest unit in K8s, holds one or more containers.
- CRI → Manages containers
- CNI → Handles networking
- CSI → Manages storage.
- CRI (Container Runtime Interface)
- Enables Kubernetes to use different container runtimes (e.g., containerd, CRI-O, Docker).
- Defines how Kubernetes interacts with the runtime to manage containers.
- Decouples Kubernetes from specific runtimes for flexibility.
- CNI (Container Network Interface)
- Standard for configuring networking in Kubernetes pods.
- Plugins (e.g., Calico, Flannel, Cilium) handle IP allocation, routing, and network policies.
- Ensures pods can communicate within and outside the cluster.
- CSI (Container Storage Interface)
- Allows Kubernetes to integrate with external storage systems (e.g., AWS EBS, NFS, Ceph).
- Standardizes how storage is provisioned, attached, and mounted to pods.
- Enables dynamic volume provisioning and snapshots.
- Autoscaling – Increases or decreases containers based on traffic.
- Self-Healing – Restarts failed containers, replaces unhealthy ones.
- Load Balancing – Distributes traffic across containers for efficiency.
- Rolling Updates & Rollbacks – Updates apps without downtime and rolls back if needed (high availability)
- Service Discovery – Finds and connects services without manual setup (using IP adress or DNS).
- Storage Management – Supports local, cloud, or network storage easily.
- Multi-Cloud & Hybrid Support – Runs across AWS, Google Cloud, Azure, and on-prem.
- Automated Deployments – Uses YAML files for easy and repeatable deployments.
- Secrets & Config Management – Manages configuration and sensitive data securely.
- Resource Optimization – Ensures best use of CPU, memory, and storage (automatic bin packing)
- production Support– Can be used for production environments
Note: In this class, we will use kubernetes playgrounds on Killercoda for testing and deploy our production cluster in AWS EKS. The following are just for more information on various methods available.
- Minikube – Runs a single-node K8s cluster on your laptop. You can check the official documentation for minikube just to get more information.
- Kind (Kubernetes in Docker) – Uses Docker to run lightweight K8s clusters.
- K3s – A lightweight Kubernetes distribution for low-resource systems.
- MicroK8s – A lightweight K8s version from Canonical.
- Killercoda playgroungs for Kubernetes: Killercoda is a platform where you get instant access to a real Linux or Kubernetes environment ready to use. Note: In the cluster setup for this class, you will learn how to use it. We will use it for some practices
- using Kubeadm
- Using kubespray
- Using Kops
- From scratch (complex)
- Amazon EKS – Kubernetes on AWS. Note: This is what we will use in this class
- Google GKE – Kubernetes on Google Cloud.
- Azure AKS – Kubernetes on Microsoft Azure.
- Oracle OKE - Kubernetes on Oracle
- LKE - Kubernetes on Linode
- ...
- Openshift – Red Hat’s enterprise Kubernetes with extra features.
- Rancher – Multi-cluster Kubernetes management.
- Tanzu - vSphere Tanzu Kubernetes Grid (TKG)
- ...
- Command Line Interface (CLI): using
kubectlcommands - User Interface (UI): using the native K8s Dashboard or tools like Lens
- Kubernetes API: Using programmatical access (ex. with python scripts, terraform codes etc.)
The repo is organized and ordered for you to practice the concepts progressively.
In each folder, you will find a readme file to help you understand the concept and practice.
Note: All the files mentioned in the readme can be directly found in the same folder. Just use the content of those files if no other specification is given.