https://drive.google.com/file/d/13O7zheKIMI3Y_G9kHd8PoFi5VWdWtOT9/view?usp=sharing
A Pod is the smallest deployable unit in Kubernetes. It represents one or more containers that share:
Think of a Pod as a wrapper around one or more containers that must run together.
myfirstpod.ymlapiVersion: v1
kind: Pod
metadata:
name: nnappone
labels:
app: nnappone
spec:
containers:
- name: networknuts-app
image: lovelearnlinux/webserver:v1
| Section | Field | Purpose |
|---|---|---|
| apiVersion | v1 |
Refers to core Kubernetes API group used for Pods. |
| kind | Pod |
Defines what object you are creating. |
| metadata.name | nnappone |
Unique pod name in the namespace. |
| metadata.labels | app: nnappone |
Used for grouping and selectors (for Services, ReplicaSets, etc.). |
| spec.containers | [ ... ] |
List of containers to run inside the Pod. |
| containers.name | networknuts-app |
Logical name of the container (for logs, exec, etc.). |
| containers.image | lovelearnlinux/webserver:v1 |
Docker image from registry. Kubernetes will pull and run it. |