DevOpsLesson
DevOpsLesson

Free, comprehensive DevOps tutorials and learning roadmaps. Master Docker, Kubernetes, CI/CD, and more.

Stay Updated

Get notified about new tutorials and features.

Tutorials

  • What is DevOps?
  • Docker Tutorial
  • Terraform Tutorial
  • CI/CD Pipeline
  • All Tutorials

Roadmaps

  • DevOps Engineer
  • Cloud Engineer
  • SRE Path
  • All Roadmaps

Company

  • About Us
  • Blog
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 DevOpsLesson. All rights reserved.

DOCKERKUBERNETESTERRAFORMAWSCI/CDLINUXGITDEVOPS ROADMAPCLOUD ROADMAPSRE ROADMAPGIT CHEATSHEETDOCKER CHEATSHEETK8S CHEATSHEETTF CHEATSHEETLINUX CHEATSHEETDOCKERFILE LINTERYAML VALIDATORCRON PARSERREGEX TESTER

Kubernetes Tutorial

Introduction to Kubernetes
Kubernetes Architecture
Installing Kubernetes
kubectl Basics
Kubernetes Pods
Kubernetes Deployments
Kubernetes Services
ConfigMaps and Secrets
Kubernetes Storage
Kubernetes Namespaces
Kubernetes Resource Management
Helm for Kubernetes
Kubernetes Monitoring

kubectl get and describe

PreviousPrev
Next

Inspect pods, nodes, deployments, and services with kubectl get and use describe output to understand object behavior and events.

Why get and describe Matter

Before you change anything in Kubernetes, you usually inspect what is already there. kubectl get gives you a quick list view, while kubectl describe gives you a deeper story.

Common kubectl get Commands

kubectl get pods
kubectl get nodes
kubectl get deployments
kubectl get services
kubectl get all

kubectl get all is convenient, but remember that it does not show literally every resource type in the cluster.

Useful Output Formats

kubectl get pods -o wide
kubectl get deployment web -o yaml
kubectl get service api -o json

When to Use Each

FormatBest use
default tableQuick summaries
-o wideExtra networking and node details
-o yamlFull manifest-style object view
-o jsonAutomation and tooling

Reading Labels with Selectors

Labels help you group resources.

kubectl get pods -l app=web
kubectl get pods -l app=web,tier=frontend

Selectors are powerful because many Kubernetes resources use them to connect things together, especially Services and Deployments.

Using kubectl describe

kubectl describe pod my-pod

The output includes:

  • metadata
  • labels and annotations
  • container images and ports
  • conditions
  • mounted volumes
  • recent events

Why the Events Section Is Gold

The Events section often explains failures faster than anything else.

Common event clues include:

  • image pull errors
  • failed scheduling
  • probe failures
  • container restarts
kubectl describe pod my-pod
kubectl get pod my-pod -o yaml

Use describe when you want a human-friendly summary. Use -o yaml when you want the raw object structure.

A Practical Debugging Flow

kubectl get pods
kubectl get pods -o wide
kubectl describe pod my-pod
kubectl get pod my-pod -o yaml

Why This Skill Matters

Think of kubectl get as looking at a building directory and kubectl describe as talking to the building manager. One gives quick listings. The other gives context.

These commands are the foundation of Kubernetes troubleshooting.

Exercise

Best Command for Events

Which command is most useful when you want to read the event history for a pod?

Exercise

Selector Use

What does `kubectl get pods -l app=web` do?

PreviousPrev
Next

Continue Learning

Installing Kubernetes with kind

Use kind to spin up single-node and multi-node Kubernetes clusters inside Docker for fast testing and learning.

20 min·Easy

Installing kubectl

Install kubectl on macOS, Linux, or Windows, verify it works, and understand how kubeconfig connects the CLI to a cluster.

18 min·Easy

kubectl Basics

Learn how kubectl fits into Kubernetes workflows and when to use imperative commands versus declarative manifests.

15 min·Easy

Explore Related Topics

Do

Docker Tutorials

Build the containers Kubernetes orchestrates

Te

Terraform Tutorials

Provision Kubernetes clusters as code

Try the Tool

YAML Validator

Validate Kubernetes manifests and any YAML files instantly.

On This Page

Why `get` and `describe` MatterCommon `kubectl get` CommandsUseful Output FormatsWhen to Use EachReading Labels with SelectorsUsing `kubectl describe`Why the Events Section Is GoldA Practical Debugging FlowWhy This Skill Matters