Kubernetes Basics

What is Kubernetes

  • Container orchestration platform
  • Handles:
    • Deployment
    • Scaling
    • Networking
    • Self-healing
  • Built by Google, now maintained by the CNCF
  • Think of it as the "control tower" for container ships (apps)

Core Terminology

  • Pod: One or more containers, smallest deployable unit
  • Node: A worker machine (VM or physical) that runs pods
  • Cluster: Group of nodes managed together
  • Deployment: Desired state management for pods
  • Service: Abstracts and exposes a group of pods
  • Namespace: Isolated environments within a cluster

High-Level Architecture

  • API Server: Front door to the cluster
  • etcd: Stores all cluster configs
  • Scheduler: Places pods on nodes
  • Controller Manager: Keeps desired state

Control Plane vs Worker Nodes

Control Plane

  • API Server
  • Scheduler
  • Controller Manager
  • etcd (database)

Worker Nodes

  • Kubelet (pod manager)
  • Kube Proxy (networking)
  • Container runtime (e.g., containerd)
  • Runs the actual Pods

Deployment Methods

  • Minikube – Local development
  • kubeadm – Manual cluster setup
  • Managed Services:
    • GKE (Google)
    • EKS (AWS)
    • AKS (Azure)
  • Helm – Kubernetes package manager

Choose based on scale and team size

Declarative vs Imperative

Imperative:

kubectl run nginx --image=nginx

Declarative:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx
spec:
  replicas: 2
  template:
    spec:
      containers:
      - name: nginx
        image: nginx

Prefer declarative (YAML) for production & GitOps

Ecosystem Tools

  • Helm: App packaging & deployment
  • Prometheus + Grafana: Monitoring
  • ArgoCD: GitOps for K8s
  • Istio / Linkerd: Service mesh
  • K9s: Terminal UI for K8s clusters

Summary & Takeaways

  • Key concepts: Pods, Nodes, Services, Deployments
  • Understand Control Plane vs Worker Nodes
  • Choose the right deployment method
  • Embrace declarative infrastructure

Questions / Demo?