Kubernetes Overview

What is Kubernetes?

  • Open-source container orchestration platform
  • Originally developed by Google (Borg system)
  • Now maintained by Cloud Native Computing Foundation (CNCF)
  • Manages containerized applications across clusters

Key Features

  • Automated deployment and scaling
  • Self-healing capabilities
  • Service discovery and load balancing
  • Storage orchestration
  • Secret/configuration management
  • Batch execution (in addition to services)

Core Components

Control Plane

  1. API Server: Frontend for cluster management
  2. etcd: Distributed key-value store for cluster data
  3. Scheduler: Assigns workloads to nodes
  4. Controller Manager: Regulates cluster state
  5. Cloud Controller Manager: Cloud provider integrations

Worker Nodes

  1. Kubelet: Node agent
  2. Kube Proxy: Network traffic management
  3. Container Runtime: Docker/containerd/CRI-O

Key Objects

  • Pods: Smallest deployable units
  • Services: Network endpoints
  • Deployments: Declarative updates
  • ConfigMaps/Secrets: Configuration management

Architecture Overview


flowchart TD subgraph ControlPlane API-Server Scheduler ControllerManager etcd end subgraph WorkerNode1 subgraph Pod1 Container1 Container2 end subgraph Pod2 Container3 end Kubelet end subgraph WorkerNode2 subgraph Pod3 Container4 end Kubelet end API-Server -->|Manages| WorkerNode1 API-Server -->|Manages| WorkerNode2 Kubelet -->|Reports to| API-Server Kubelet -->|Manages| Pod1 Kubelet -->|Manages| Pod2 Kubelet -->|Manages| Pod3

Common Use Cases

  • Microservices architecture
  • Hybrid/multi-cloud deployments
  • Continuous Deployment pipelines
  • Machine learning workflows
  • Legacy application modernization

Benefits

  • Horizontal scaling
  • High availability
  • Infrastructure abstraction
  • Cloud-agnostic deployments
  • Declarative configuration

Quick Start Example

# Create a deployment
kubectl create deployment nginx --image=nginx

# Expose as service
kubectl expose deployment nginx --port=80

# Scale up
kubectl scale deployment nginx --replicas=3

Learning Resources

  1. Official Documentation
  2. Kubernetes the Hard Way
  3. KubeAcademy
  4. Book: "Kubernetes in Action" by Marko Luksa