Keyboard Shortcuts N Next post
P Previous post
S Save / unsave
R Read aloud
T Toggle theme
/ Focus search
Esc Close panels
🔥
Ready to read...
K8s Troubleshooting Kubernetes Kubernetes: From Zero to Production Module 8 - Monitoring and Troubleshooting

Kubernetes Events and Troubleshooting Tools

Reviewed & accurate
AI Summary

What You Will Learn

Intermediate

  • How to read K8s events
  • Useful debugging tools
  • k9s and kubectl-debug
Terminalbash
# View cluster events
kubectl get events --sort-by='.lastTimestamp'

# Events for a specific Pod
kubectl get events --field-selector involvedObject.name=my-pod

# Events in a namespace
kubectl get events -n production

Useful Debugging Tools

ToolWhat it does
k9sTUI for K8s - navigate everything interactively
kubectl-debugAttach a debug container to a Pod
sternTail logs from multiple Pods at once
kubectxSwitch between clusters/namespaces quickly
kube-shellEnhanced kubectl shell with autocomplete

Practical Exercise

Run: kubectl get events --sort-by='.lastTimestamp'
Run: kubectl describe pod - read Events section
Install k9s: brew install k9s (amazing TUI tool)
Run k9s and explore your cluster interactively

Key Takeaways

  • kubectl get events: see what K8s is doing.
  • Events sorted by time show the timeline of issues.
  • k9s: TUI for navigating K8s (highly recommended).
  • stern: tail logs from multiple Pods simultaneously.
  • kubectl describe: Events section is at the bottom.
Previously: Lesson 41 covered Pod debugging.
Today: You learned: Events, k9s, and advanced debugging tools.
Next: Lesson 43 covers resource issues.
Test Your Knowledge
How did you find this?

Comments

Join the discussion! Sign in with your Google or Blogger account, or comment as Anonymous - no account needed. For quick questions, also reach me on Telegram @cytestch.

Comments