Day 59: Kubernetes JSONPath with kubectl | CKA Course 2025
👉 GitHub Repository: https://github.com/CloudWithVarJosh/C...
👉 CKA 2025 Playlist: • CKA Certification Course 2025
👉 Kubernetes Projects: • Kubernetes Projects
Join the Channel to show your support: / @cloudwithvarjosh
📚 Welcome to Day 59!
Today we master Kubernetes JSONPath with kubectl. You’ll see what happens under the hood when you run kubectl get, why the API shape is JSON even if you author YAML, and how to pull exact fields using -o jsonpath=... for clean, scriptable output. We’ll cover core JSONPath operators, filters, and kubectl’s {range}{end} loops, then practice on a pod manifest and live cluster objects.
🛠 What You’ll Learn in This Demo
✅ Under the hood of kubectl get: HTTPS, content negotiation (JSON/protobuf), decoding, rendering
✅ JSON vs YAML refresher: where they differ, how they map 1:1 in Kubernetes
✅ JSONPath core operators: root, dot, wildcards, indexing, filters ?(@.field=="val")
✅ Practical kubectl -o jsonpath=...: newlines/tabs, quoting tricky keys, {range}{end} loops
✅ Real-world demos: querying a manifest and live objects (Pods, Deployments, Services, Nodes)
✅ Exam mindset: selectors first, then JSONPath; think in JSON fields for speed & precision
💡 By the end of this lecture:
You’ll be able to extract exactly the fields you need from Kubernetes objects—fast and repeatably—using JSONPath, with clean one-liners you can pipe into scripts or use directly during the CKA.
🔗 Stay Connected
👉 LinkedIn: / varun-joshi-2b516752
👉 GitHub: https://github.com/CloudWithVarJosh
💬 Got questions? Drop them in the comments — I reply to every single one.
👍 Like, share, and subscribe to follow the entire CKA 2025 series!
⏰ Timestamps
00:00:00 Introduction
00:01:03 Prerequisites: Day 09 — YAML Fundamentals
00:01:33 Under the Hood: What Happens When You Run kubectl get pods
00:11:42 What is JSON? What is YAML? Quick Refresher
00:18:32 YAML ↔ JSON: Similarities
00:19:34 YAML ↔ JSON: Differences
00:20:52 YAML ↔ JSON: Structure Mapping
00:24:58 Why JSONPath? What It Solves
00:28:39 Walkthrough: Core JSONPath Operators
00:31:27 Demo: Query a Pod Manifest with JSONPath
00:35:46 Demo: JSONPath on Live Kubernetes Objects
00:44:01 Outro
🔖 Hashtags
#Kubernetes #CKA #CKA2025 #JSONPath #kubectl #YAML #JSON #DevOps #SRE #CloudWithVarJosh #CKACourse