Day 1 of 5
⏱ ~60 minutes
Kubernetes in 5 Days — Day 1

Pods and the Kubernetes Architecture

Install kubectl and minikube, understand the control plane and nodes, run your first Pod, and inspect it with kubectl commands.

The Kubernetes Architecture

A Kubernetes cluster has a control plane and worker nodes. The control plane makes decisions (scheduling, scaling). Worker nodes run your containers. You interact with the control plane via kubectl.

Install and Start minikube
# Install kubectl: kubernetes.io/docs/tasks/tools/
# Install minikube: minikube.sigs.k8s.io

minikube start
kubectl get nodes
# Should show one node: minikube   Ready   control-plane
Your First Pod
# pod.yaml
apiVersion: v1
kind: Pod
metadata:
  name: my-pod
  labels:
    app: my-app
spec:
  containers:
  - name: web
    image: nginx:alpine
    ports:
    - containerPort: 80
kubectl basics
kubectl apply -f pod.yaml
kubectl get pods
kubectl describe pod my-pod
kubectl logs my-pod
kubectl exec -it my-pod -- /bin/sh
kubectl delete pod my-pod

# Port-forward to test locally
kubectl port-forward pod/my-pod 8080:80
# Now visit http://localhost:8080
💡
Pods are ephemeral — they die and don't come back on their own. You rarely create Pods directly. Deployments manage Pods and ensure the desired number are always running. We cover Deployments in Day 2.
📝 Day 1 Exercise
Run Your First Pod
  1. I
  2. n
  3. s
  4. t
  5. a
  6. l
  7. l
  8. k
  9. u
  10. b
  11. e
  12. c
  13. t
  14. l
  15. a
  16. n
  17. d
  18. m
  19. i
  20. n
  21. i
  22. k
  23. u
  24. b
  25. e
  26. .
  27. S
  28. t
  29. a
  30. r
  31. t
  32. a
  33. c
  34. l
  35. u
  36. s
  37. t
  38. e
  39. r
  40. .
  41. W
  42. r
  43. i
  44. t
  45. e
  46. a
  47. P
  48. o
  49. d
  50. m
  51. a
  52. n
  53. i
  54. f
  55. e
  56. s
  57. t
  58. f
  59. o
  60. r
  61. n
  62. g
  63. i
  64. n
  65. x
  66. .
  67. A
  68. p
  69. p
  70. l
  71. y
  72. i
  73. t
  74. .
  75. U
  76. s
  77. e
  78. d
  79. e
  80. s
  81. c
  82. r
  83. i
  84. b
  85. e
  86. ,
  87. l
  88. o
  89. g
  90. s
  91. ,
  92. a
  93. n
  94. d
  95. e
  96. x
  97. e
  98. c
  99. t
  100. o
  101. i
  102. n
  103. s
  104. p
  105. e
  106. c
  107. t
  108. i
  109. t
  110. .
  111. P
  112. o
  113. r
  114. t
  115. -
  116. f
  117. o
  118. r
  119. w
  120. a
  121. r
  122. d
  123. a
  124. n
  125. d
  126. v
  127. e
  128. r
  129. i
  130. f
  131. y
  132. i
  133. t
  134. s
  135. e
  136. r
  137. v
  138. e
  139. s
  140. t
  141. r
  142. a
  143. f
  144. f
  145. i
  146. c
  147. .

Day 1 Summary

  • A cluster = control plane + worker nodes. kubectl talks to the control plane API.
  • Pods are the smallest deployable unit. One or more containers sharing a network namespace.
  • kubectl apply -f file.yaml creates/updates resources. kubectl delete -f file.yaml removes them.
  • kubectl describe shows full resource details including events. First debugging tool.
Finished this lesson?