Problem Statement
Managing multiple containers across many servers manually leads to errors, inconsistent deployments, and downtime. Without automation, scaling services or recovering from failures becomes slow and unreliable.
Jump into concepts and practice - no test required
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ User/API │──────▶│ Kubernetes │──────▶│ Cluster │
│ Requests │ │ Control │ │ Nodes │
└─────────────┘ │ Plane │ │ ┌─────────┐ │
└─────────────┘ │ │ Pod A │ │
│ ├─────────┤ │
│ │ Pod B │ │
│ └─────────┘ │
└─────────────┘This diagram shows how user requests go to the Kubernetes control plane, which manages the cluster nodes and schedules pods (containers) on them.
pod in Kubernetes?kubectl get pods.kubectl list pods and kubectl show pods are invalid commands; kubectl describe pods all is incorrect syntax.apiVersion: v1
kind: Pod
metadata:
name: myapp-pod
spec:
containers:
- name: myapp-container
image: nginx:latest
ports:
- containerPort: 80
What will kubectl get pods myapp-pod show after creation?kubectl apply -f pod.yaml but get an error: "error: unable to recognize \"pod.yaml\": no matches for kind \"Pod\" in version \"v2\"". What is the likely fix?nginx:1.19 to nginx:1.21 without downtime. Which Kubernetes resource and method should you use?kubectl set image.kubectl set image -> Option A