Okay, so today I decided to mess around with checking the state of a Kubernetes cluster, you know, just to see what’s up with my pods and nodes. Nothing fancy, just wanted to get a quick overview. It’s like checking the fridge to see what you have before deciding what to cook.

Getting Started
First things first, I fired up my terminal. I usually have it open anyway, because, well, that’s where I live most of the time. I made sure my kubectl was configured correctly. That’s the command-line tool, for talking to Kubernetes.
Checking Node Status
I typed in kubectl get nodes. Simple, right? This command is like asking “Hey Kubernetes, show me your workers!”
Boom! The terminal spat out a list of my nodes. It shows their status (Ready or NotReady, I hope everything is Ready), roles, age, and the Kubernetes version they’re running.
I wanted to see even more details, I ran
kubectl describe node <node-name>.
This command gives you the full lowdown on a specific node. Everything from CPU and memory usage to the conditions it’s experiencing.

Checking Pod Status
Then I did a kubectl get pods -A. The “-A” is important there – it means “show me all the pods, from all the namespaces.” It’s like looking at all the food packages you have, not just the ones in the front row.
This gave me a list of every single pod running in my cluster. Their status, how many times they’ve restarted (hopefully not many!), and how long they’ve been alive. If something’s in “CrashLoopBackOff” or “Error” state, I know I have some debugging to do.
I wanted to get the full story for one of the pods,
so I ran
kubectl describe pod <pod-name> -n <namespace>.
That’s the deep dive. It shows you events, container details, environment variables… everything. It is great for troubleshooting when things go wrong, because the error messages are in this massive output.

Finishing Up
After poking around and making sure everything looked reasonably healthy, I closed my terminal. It’s like when you’re done checking the food situation and you close the fridge door, mission accomplished.
I didn’t actually do anything today, other than look. It was a simple “state check” session, nothing more. But sometimes it’s good to just check in, you know?