Pods & YAML Demystified ๐งพ

Hey everyone ๐
Today was one of those days in my Kubernetes journey where things started to feel a bit complex and overwhelming, but I chose not to give up. Instead, I chose to document, reflect, and move ahead โ one step at a time.
๐ธ Radhe Radhe for the strength, and let's begin.
๐ง What I Learned Today
This session focused on two crucial building blocks of Kubernetes:
Pods โ the smallest deployable unit in K8s
YAML โ the configuration language we use to define everything in Kubernetes
๐ Key Takeaways
๐ณ Pods โ The Core of Kubernetes
A Pod is the smallest unit you can deploy in K8s. It usually wraps a single container but can hold more than one if needed.
Example (Imperative):
kubectl run nginx --image=nginx
๐ YAML โ Your Way to Talk to Kubernetes
Kubernetes loves YAML. Here's why it matters:
Human-readable
Spacing-sensitive (no tabs!)
Used to define every resource in a cluster
A basic pod YAML looks like this:
apiVersion: v1 kind: Pod metadata: name: mypod spec: containers: - name: nginx-container image: nginx
๐งฉ Imperative vs Declarative
๐งช Imperative (kubectl run ) | ๐ Declarative (kubectl apply -f ) |
Great for quick testing | Best for production setup |
Not version controlled | Can be stored in Git |
Less flexible | Full control and history |
kubectl run nginx --image=nginx --dry-run=client -o yaml > pod.yaml
๐ Troubleshooting & Useful Commands
kubectl describe pod
โ See events and logs for debuggingkubectl get pods -o wide
โ See node infokubectl get pods --show-labels
โ Filter with labelskubectl exec -it pod-name -- bash
โ Get inside a running Podkubectl edit pod pod-name
โ Edit directly in terminal (usingvi
)
๐ฌ My Reflections
Today wasnโt easy.
There were moments when:
The concepts felt abstract
Tools like KIND were heavy to download
Hands-on felt out of sync with the theory
But instead of switching tracks or getting frustrated, I reminded myself:
โLearning something powerful will never feel easy โ thatโs what makes it powerful.โ
And with discipline and a bit of faith in Shree Krishna & Radha Rani, I kept going.
Subscribe to my newsletter
Read articles from TheTansih directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
