Lecture: Kubernetes Overview
What is Kubernetes?
- Kubernetes is an open-source container orchestration platform.
- Automates deployment, scaling, and management of containerized applications.
- Originated from Google's internal system, Borg.
- Open-sourced by Google in 2014.
Origin of the Name "K8s"
- Abbreviated as K8s.
- The number 8 in K8s represents the 8 letters between the first 'K' and the last 's' in "Kubernetes".
- Similar abbreviations: i18n (internationalization), l10n (localization).
Kubernetes Cluster Architecture
Control Plane
- Control Plane: Manages the state of the cluster.
- Usually runs on multiple nodes across several data centers.
- Core components:
- API Server: Primary interface; exposes a RESTful API.
- etcd: Distributed key-value store; stores the cluster's persistent state.
- Scheduler: Schedules pods onto worker nodes.
- Controller Manager: Runs controllers to manage the cluster state (e.g., replication controller, deployment controller).
Worker Nodes
- Worker Nodes: Run the containerized application workloads.
- Core components:
- Kubelet: Daemon on each worker node; communicates with the control plane and ensures desired state of pods.
- Container Runtime: Runs containers on worker nodes; pulls images, starts/stops containers, manages resources.
- Kube-proxy: Network proxy; routes traffic, provides load balancing.
Pods
- Pods: Smallest deployable units; host one or more containers.
- Provide shared storage and networking for containers.
- Created and managed by the control plane.
Benefits of Kubernetes
- Scalable & Highly Available:
- Self-healing
- Automatic rollbacks
- Horizontal scaling
- Portable:
- Consistent and reliable deployments
- Runs on-premise, public cloud, or hybrid environments
- Uniform way to package, deploy, and manage applications
Downsides of Kubernetes
- Complexity:
- Difficult to set up and operate
- High upfront cost, especially for new organizations
- Requires expertise and resources for management
- Cost:
- Minimum resource requirements for supporting features
- Potentially overkill for smaller organizations
Managed Kubernetes Services
- Managed Services by cloud providers (e.g., Amazon EKS, Google GKE, Azure AKS).
- Offload control plane management.
- Suitable for mid-size organizations to test Kubernetes.
- Small organizations may not need it (YAGNI - You ain’t gonna need it).
Learning More
- More resources available through books and weekly newsletters.
- Recommended to subscribe for updates.
Thank you for attending and see you next time!