🚨 DevOps/SREs: Tired of kubectl describe Overload? Meet Your New Debugging BFF 🚨 Hey…
- User
🚨 DevOps/SREs: Tired of kubectl describe Overload? Meet Your New Debugging BFF 🚨
Hey Kubernetes crew! 👋 Let’s talk about a daily struggle: debugging resource conditions.
You know the drill: A pod’s stuck in Pending, a node’s acting weird, or a deployment’s not rolling out. You run kubectl describe, scroll through 50 lines of events, and still can’t spot the condition issue. Sound familiar?
I’ve got a fix that’ll save you 10 mins every debug session.
Meet kubectl cond – The Condition-Specific Plugin
kubectl cond is a lightweight Kubernetes plugin that fetches and displays only resource conditions (no fluff). Conditions are the "health checks" of your cluster—things like Ready, MemoryPressure, or PodScheduled.
👉 Think of it as kubectl get… but laser-focused on what matters.
Why You’ll Love It (As a DevOps/SRE)
✅ No More Noise: Ditch describe’s wall of text. kubectl cond shows only conditions (e.g., Ready=True, Unschedulable=False).
✅ Familiar Workflow: Uses kubectl-style commands. If you know kubectl get, you’ll pick it up in 2 mins.
✅ Works Everywhere: Pods, nodes, deployments, daemonsets—check conditions for any resource type.
How to Install It (2 Mins Flat)
kubectl cond runs via Krew (Kubernetes’ plugin manager). Here’s the quick setup:
Step 1: Install Krew (if you don’t have it)
look at https://krew.sigs.k8s.io/docs/user-guide/setup/install/
Step 2: Install kubectl cond
kubectl krew install cond
Verify: kubectl cond --help # Should show usage docs!
: Debug a Pod in 10 Seconds
Let’s say your pod my-app is Pending. Instead of kubectl describe pod my-app, run: kubectl cond pod my-app -n default
Examples
- Get conditions for a specific pod in a namespace
kubectl cond pod my-pod -n default
Outputs condition summaries for pod my-pod in the default namespace.
- Get conditions for all nodes
kubectl cond nodes
Displays the condition status (e.g., Ready, MemoryPressure) for all cluster nodes.
- Get conditions using manifest file
kubectl cond -f deployment.yaml
Fetches conditions for resource(s) declared inside deployment.yaml.
- Get conditions for all resource types within a namespace
kubectl cond all -n kube-system
Shows conditions from all resource kinds in the kube-system namespace.
- Assistant