AKS Today – Kubectl Commands

Today, I played around with some kubectl commands and learned a few things!

03c58d263467bd97c05f32c36a4683d6.png

  • How to query Kube-system by specifying the namespace flag
  • Use contexts to manage “profiles” for kubectl
  • Tweak the output to wide or json or filter the results using jsonpath
  • Edit resources like pods, deployments, etc RIGHT in kubectl by using kubectl edit
  • Labels and annotations
    • Labels are tags
    • Annotations are notes
    • Key/value pairs for both
    • –overwrite to overwrite

c56a47e0d090e6e7253a67ef4d57da68.png