← Back to blog
bpdubuntu

Essential `kubectl` Commands for Managing Your Kubernetes Cluster

22 January 2026bpd · ubuntu

Your Command-Line Interface to Kubernetes

`kubectl` is the primary tool you’ll use to interact with your Kubernetes cluster. The ‘Ubuntu System Administration Guide’ provides a list of must-know commands for inspecting and troubleshooting your applications.

Core Inspection Commands

  • `kubectl get pods -A`: Lists all Pods across all namespaces, giving you a quick overview of what’s running in your cluster.
  • `kubectl get service -A`: Lists all the services and their cluster IPs and ports.
  • `kubectl get ingress -A`: Shows all the Ingress rules you have defined.

Drilling Down into a Pod

When a Pod isn’t working as expected, you can dig deeper:

  • `kubectl describe pod <pod-name> -n <namespace>`: Provides a detailed description of the Pod, including its current state and a log of recent events, which is often the first place to look for errors.
  • `kubectl logs -f <pod-name> -n <namespace>`: Streams the live logs from the containers within the Pod, allowing you to see application-level errors in real-time.

This post is based from content of the book Ubuntu System adminstration guide. And the book can be found here https://www.amazon.com/stores/Mattias-Hemmingsson/author/B0FF5CQX13