What Is kubectl describe in Kubernetes? The Detective’s Magnifying Glass

What Is kubectl describe in Kubernetes? The Detective's Magnifying Glass

A beginner-friendly guide to the command that tells you the full story of any Kubernetes object, including the events that explain why something is broken, stuck or slow.

Imagine you take your car to a garage because it will not start. The mechanic could glance at the dashboard and say, “yes, it is not starting”. That would be true, but useless. A good mechanic opens the bonnet, checks the battery, the fuel, the spark plugs and the service history, and then tells you: “the battery is dead, and the fuel pump complained three times last night”. The dashboard shows a summary, but the full inspection tells the story.

Kubernetes has both. A simple listing tells you that an application is “Pending” or “CrashLoopBackOff”, which is the dashboard light. The command called kubectl describe is the full inspection. It collects everything the cluster knows about one object, puts related information beside it, and adds a diary of recent events that usually names the exact reason for the trouble. In this guide you will learn what it is, how it works, how to read each part of its output, how to use it to solve the most common problems, and which habits make you fast and safe with it.

1The Problem: A Sick Pod and Too Many Questions

Before learning the tool, it helps to feel the problem that the tool removes.

When a summary is not enough

Kubernetes runs your programs inside small units called Pods. When everything is healthy, you rarely look at them closely. But one day you list your Pods and see one with a worrying status: it says Pending, or ImagePullBackOff, or CrashLoopBackOff. These words tell you that something is wrong, but not what, not why, and not what to do next.

Now the questions pile up. Was the Pod ever placed on a machine? If so, which one? Did it manage to download its container image? Did the program start and then crash, and with what exit code? Did a health check fail? Is a storage disk missing? Is it waiting for a resource that does not exist? A one-line summary cannot answer any of these.

Simple Analogy

Think of a hospital. The board at the nurses’ station says “Bed 12: unwell”. That is the summary. The patient’s chart, with temperature, medicines, test results and the nurse’s notes, is what the doctor actually needs. Describe is the patient chart of Kubernetes.

Why guessing is expensive

Without a proper inspection, people guess. They restart Pods, delete objects, change settings at random and hope. Each guess costs time and may hide the original cause. The cluster, however, already knows exactly what went wrong. It records the decisions made by its parts, and it writes short messages, called events, whenever something notable happens. The only skill you need is knowing where to read them, and describe puts them in front of you.

!
Common Misconception

Many beginners jump straight to reading application logs whenever something fails. Logs only exist if the program actually started. If the Pod never got a machine or never downloaded its image, there are no logs at all, and describe is the only place with answers.

1 command
gathers the whole story of an object
Read-only
it never changes anything in the cluster
Events
the diary that usually names the cause

2What Is kubectl describe?

It is a read-only command that prints a detailed, human-friendly report about a Kubernetes resource.

The plain definition

The kubectl tool is the command-line tool used to talk to a Kubernetes cluster. Its describe action asks the cluster for a chosen object, such as a Pod, a node, a Deployment or a Service, and prints a neatly organised report. The report contains the main settings of the object, its current status, the conditions it is in, and, very importantly, the recent events connected with it.

The word “describe” is exactly right. Where a listing gives you one line per object, describe gives you a page of description for one object, written for a human to read from top to bottom.

Simple Analogy

A listing is like the spine of a book on a library shelf: it shows the title and nothing else. Describe is like opening the book to the back cover and the reviews. You still have not read the whole story, but you now know what the book is, what condition it is in and what other readers noticed.

Why it exists

Kubernetes objects are stored as structured data, and this raw data is long, repetitive and hard to read. Important facts, such as which events happened, live in separate objects and would need several different commands to gather. Describe exists to save you that work by collecting the scattered pieces, arranging them logically, and printing them in a readable layout with labelled sections.

Where it is used

Engineers use describe every day, first when a new application fails to start, then when it slows down or restarts, and finally when they want to understand how an object is configured. Platform teams use it to check node health and available capacity. Support engineers ask users to paste its output when reporting problems, because it contains most of the context in one place.

i
Remember This

Describe is for people, not for programs. Its layout is designed for reading and may change between versions of the tool. If a script needs data, use the structured output formats instead, which are stable and predictable.

3Describe versus Get versus Logs versus Events

Kubernetes offers several ways to look at things. Knowing which one to reach for saves a great deal of time.

Beginners often mix up the different viewing commands, because they all seem to “show information”. In fact, each one answers a different kind of question, and a good troubleshooter uses them in a sensible order.

ToolWhat it showsBest question it answersWeakness
Get (list view)One short line per objectWhat exists and roughly how is it doing?No reasons, no detail
Get with structured outputThe complete raw object as dataWhat exactly is stored, precisely?Long, dense, no events, hard to read
DescribeA readable report with related eventsWhy is this object in this state?Layout not meant for scripts
LogsText printed by the running programWhat did the application itself say?Empty if the program never started
Events listingCluster-wide diary of recent eventsWhat has been happening lately across everything?Short memory, and no object detail
Simple Analogy

Suppose a shop is not opening on time. The listing is the town notice board saying “Shop 5: closed”. The raw structured view is the shop’s registration paperwork. The logs are the shopkeeper’s diary of what happened inside. The events listing is the neighbourhood watch report. Describe is the inspector’s summary that combines the paperwork with the watch report about that specific shop.

A sensible order of use

1

List to find the problem

Use the list view to see which objects are unhealthy and what their short status words are.

2

Describe to understand the cause

Read the report and especially the events at the bottom. In most cases, the cause is named right there.

3

Logs to hear the application

If the program did start and then failed, its own messages explain why the program, rather than the platform, was unhappy.

4

Structured output to confirm precise settings

When you need to check an exact value or compare two objects, view the full raw data.

i
Good Habit

Get into the habit of describing before restarting. A restart erases the current state of a Pod and may remove the very clue you needed.

4How Describe Works Behind the Scenes

To trust the output, it helps to know where the information comes from.

The main players

Describe does not have a private source of truth. It simply asks the cluster’s normal front door, the API Server, several questions and assembles the answers into one report. The cards below introduce the parts involved.

Component 1

kubectl

The command-line tool on your computer. It sends the requests and formats the final report.

Component 2

API Server

The front door of the cluster. It checks who you are, checks that you are allowed to read, and returns the data.

Component 3

etcd

The cluster’s memory, where the object and its events are actually stored.

Component 4

Controllers and scheduler

The workers that make decisions about your object and record what they did as events.

Component 5

Kubelet

The caretaker on each machine. It starts containers, runs health checks and reports problems as events.

Component 6

Related objects

Events, owners, and other connected items, such as the Pods running on a node, that describe fetches to complete the picture.

flowchart LR
  U["You run describe"] --> K["kubectl"]
  K -->|"request the object"| A["API Server"]
  K -->|"request related items and events"| A
  A --> E[("etcd database")]
  E --> A
  A --> K
  K --> R["Readable report on your screen"]
        
FIG 1 — Describe gathers several answers and stitches them into one report

Step by step

sequenceDiagram
  participant You as Engineer
  participant K as kubectl
  participant API as API Server
  participant ET as etcd
  You->>K: Describe this Pod
  K->>API: Get the Pod object
  API->>ET: Read stored data
  ET-->>API: Pod data
  API-->>K: Pod object
  K->>API: Get events about this Pod
  API-->>K: List of events
  K->>API: Get related items such as owner
  API-->>K: Related data
  K-->>You: One organised report
        
FIG 2 — The conversation between kubectl and the cluster

Because describe only reads, it never changes anything. You can run it as often as you like, on production or on a test cluster, without any risk of altering the object. The only cost is a few small requests to the API Server.

Simple Analogy

It is like a journalist writing a profile of a person. The journalist does not invent anything. They interview the person, check official records and read local news, then combine everything into one article. The article is only as good as the records, which is why events matter so much.

5The Anatomy of a Pod Report

A Pod report has many sections. Once you know what each one is for, the page stops looking like a wall of text.

The report for a Pod is the one you will read most often. It follows a consistent layout. Here are its main sections, described in the order they usually appear.

Section 1

Identity block

Name, namespace, the machine it runs on, the start time, labels and annotations. It tells you who this Pod is and where it lives.

Section 2

Status and addresses

The overall phase of the Pod, such as Pending, Running or Failed, and its network address inside the cluster.

Section 3

Controlled by

Names the owner that created and manages this Pod, such as a ReplicaSet. It shows who will replace the Pod if it disappears.

Section 4

Containers

One block per container: image, ports, current state, last state, whether it is ready, restart count, resource requests and limits, health checks and environment settings.

Section 5

Conditions

A short checklist of yes and no answers, such as whether the Pod is scheduled, initialised, and ready to serve.

Section 6

Volumes

The storage and configuration attached to the Pod, such as disks, settings bundles and secret bundles.

Section 7

Quality of service, selectors and tolerations

How important the cluster considers the Pod when resources are short, the machine labels it asked for, and the machine warnings it accepts.

Section 8

Events

The diary at the bottom. It lists what the scheduler, the kubelet and other parts have done or complained about recently.

Simple Analogy

Think of a passport. The front page has your identity, the middle pages hold stamps of the places you have been, and there is a validity date at the back. A Pod report is laid out just as neatly: identity first, detailed journey in the middle, and the recent stamps, called events, at the end.

i
Reading Trick

Scroll to the very bottom first. The events are usually the shortest and most useful part of the report. Then go back up to the container and conditions sections to confirm what the events suggest.

6Reading a Pod Report Section by Section

Now let us learn how to read each part with a detective’s eye.

Status: the big picture

The status shows the phase of the Pod. Pending means the Pod is accepted by the cluster but its containers are not yet running, often because it has no machine yet or is still downloading images. Running means at least one container is running. Succeeded means all containers finished successfully and will not restart, which is typical for one-off tasks. Failed means all containers ended and at least one ended with an error. Unknown means the cluster lost contact with the machine.

Containers: the heart of the matter

Each container has a state, and that state has a reason. Waiting means the container is not running yet, and the reason tells why, such as an image that cannot be downloaded. Running means it is up, with the time it started. Terminated means it stopped, and you see its exit code, the reason and the start and finish times.

Look for the section called Last State. When a container has crashed and been restarted, the current state may look healthy, but the last state preserves the reason for the previous crash. This is the clue many beginners miss.

The restart count is also crucial. A count that keeps rising tells you the program keeps dying, even if it looks fine at the moment you look.

Conditions: a quick checklist

ConditionIf true, it meansIf false, suspect
PodScheduledA machine has been chosen for the PodNo machine fits: capacity, machine labels, or warnings on machines
InitializedAll start-up helper containers have finishedA helper container is failing or still running
ContainersReadyAll containers report readyA container is failing its readiness check or has crashed
ReadyThe Pod can receive traffic from ServicesThe Pod is excluded from traffic until this becomes true

Resources: requests and limits

Each container states how much processor power and memory it asks for, called requests, and the maximum it may use, called limits. Requests decide where the Pod can be placed. Limits decide when the cluster steps in: a container that exceeds its memory limit is stopped, and one that exceeds its processor limit is slowed down. Reading these values often explains both scheduling failures and sudden stops.

Environment and volumes

The report lists environment settings, including where each value comes from, such as a settings bundle or a secret bundle. For secrets, the report shows the name of the source but not the value itself. The volumes section shows what storage is attached, which helps when a Pod is stuck waiting for a disk.

!
Common Mistake

Reading only the current state of a container and ignoring the last state and restart count. A container that says Running but has restarted twenty times is not healthy. It is crashing repeatedly and merely happens to be up at this moment.

7Describing Other Kinds of Objects

Describe is not only for Pods. Almost every Kubernetes object has its own useful report.

ObjectWhat its report highlightsTypical question answered
NodeConditions such as memory and disk pressure, total and available capacity, the Pods running on it, machine warningsIs this machine healthy and how full is it?
DeploymentDesired and actual replica counts, update strategy, conditions, old and new ReplicaSetsIs my rollout progressing and how many copies are ready?
ReplicaSetReplica counts, Pod template, and events about Pod creationWhy can this group not create its Pods?
ServiceSelector, type, ports and the current endpointsWhy is traffic not reaching my Pods?
IngressRules, hostnames, backends and their healthIs the outside route wired to the right Service?
PersistentVolumeClaimRequested size, status, bound volume and eventsWhy is my storage request still pending?
Job and CronJobCompletions, failures, schedule and recent runsDid my scheduled task run and succeed?
NamespaceLabels, quotas and limit rangesWhat limits apply to this team’s space?
ConfigMap and SecretNames of keys and sizes; secrets never show their valuesDoes the expected setting exist?

Node reports deserve a special mention

A node report is like a health certificate for a machine. It has a conditions checklist, including whether the memory or disk is under pressure and whether the machine is ready. It shows capacity, which is the total of the machine, and allocatable, which is what remains for Pods after the system takes its own share. It also lists every Pod on the machine along with the total of their requests. When Pods refuse to schedule, this is the fastest place to see how full your machines are.

Deployment reports tell the update story

A Deployment report shows how many copies were wanted, how many exist, how many are updated and how many are available. It lists the old and new ReplicaSets side by side, which reveals whether a rolling update is in progress or stuck. Its conditions tell you whether the Deployment is available and whether its progress has stalled.

Service reports expose broken links

The single most useful line in a Service report is the one named Endpoints. It lists the addresses of Pods currently receiving traffic. If it says none, then no Pod matches the Service’s selector or none is ready. That one line explains countless “my application is unreachable” problems.

Simple Analogy

It is like a building manager’s inspection. For a lift, the manager checks the last service date. For the fire alarm, whether it is connected. For the water tank, how full it is. The tool is the same, a clipboard, but the checklist changes with the thing inspected.

8Different Ways to Choose What to Describe

You can point the command at one object or at many. Choosing well saves time.

Way 1

By type and exact name

The most common form. You give the kind of object and its full name, and receive one report.

Way 2

By name prefix

You give the kind and the first part of a name. Every object whose name starts with that text is described. Handy because generated Pod names have long random endings.

Way 3

By label selector

You describe every object carrying certain labels, for example all Pods of one application, so you can compare them side by side.

Way 4

By file

You point at a definition file, and the tool describes the objects that file refers to, without you retyping their names.

Way 5

Across all namespaces

A switch widens the search to every namespace, useful when you do not know where an object lives.

Way 6

Every object of a type

Naming only the type describes all objects of that type in the current namespace. It produces a very long output, so use it sparingly.

Namespaces matter

Most objects live inside a namespace, and the command looks in your current namespace unless told otherwise. A very frequent moment of confusion is describing something that seems to be missing, when in fact it exists in another namespace. If you see a “not found” message, check the namespace before doubting the object.

Controlling the events

By default the report includes events. A switch can turn them off if you want a shorter output, but for troubleshooting you almost always want them on. There is also a setting for how many items are fetched at a time when describing very large lists, which matters only on big clusters.

i
Practical Tip

Because Pod names carry random endings, describing by label or by a name prefix is often easier than copying the exact name. It is also a quick way to compare healthy and unhealthy copies of the same application.

!
Watch Out

Describing every object of a type on a busy cluster can print thousands of lines. Narrow it with a namespace, a label or a prefix so you can actually read the result.

9Events: The Diary at the Bottom of the Page

If you learn to read only one section of a report, make it this one.

What an event is

An event is a short message that a part of Kubernetes writes when something notable happens to an object. The scheduler writes one when it places a Pod. The kubelet writes one when it downloads an image, starts a container or fails a health check. Controllers write one when they create or delete Pods. Describe gathers the events connected to the object and prints them in time order.

The columns of the events table

ColumnMeaningHow to use it
TypeNormal for routine happenings, Warning for problemsLook for Warning first
ReasonA short code word for what happenedThe quickest hint to the category of problem
AgeHow long ago it happened, sometimes with a repeat countRepeats mean the problem is ongoing
FromWhich component wrote it, such as the scheduler or a kubeletTells you which part of the system is complaining
MessageA sentence explaining the detailOften contains the exact cause and even the missing resource

Common reasons and what they mean

ReasonUsually means
ScheduledA machine was chosen for the Pod. This is a healthy sign.
FailedSchedulingNo machine can take the Pod, and the message lists why
Pulling and PulledThe image is being downloaded, and then was downloaded
FailedSomething failed, often an image download or container start
BackOffKubernetes is waiting longer between retries because of repeated failures
Created and StartedA container was created and started normally
UnhealthyA health check failed
KillingA container is being stopped, possibly after a failed health check or a deletion
FailedMountA volume could not be attached or a referenced bundle is missing

Events have a short memory

This is the most important limit of describe. Events are not kept forever. By default the cluster keeps them for about one hour and then removes them. If you look at a problem the next morning, the events that explained it may already be gone, leaving the section empty. This is why a report showing “no events” does not mean nothing happened.

Simple Analogy

Events are like the sticky notes on a fridge. They are quick, easy to read and perfect for the last few hours. But they are cleared away regularly, so if you need a permanent record you must copy them into a proper notebook, which in cluster terms means a logging or event-collection tool.

!
Common Mistake

Concluding that a problem has no explanation because the events section is empty. Old events may have expired. Check the container’s last state and the conditions, or reproduce the problem while watching the events live.

“Events are the cluster’s short-term memory, so read them while they are fresh.”

10Solving Problem One: The Pod Stuck in Pending

Pending means the Pod exists on paper but has not started. The events will say why.

When a Pod is Pending, the first thing to check in the report is whether a machine name appears in the identity block. If it does not, the Pod has not been scheduled. The events then normally show a FailedScheduling message, and the message contains a helpful tally of how many machines were rejected and for which reasons.

Not enough processor power or memory

The message says that a number of machines have insufficient processor power or memory. The Pod’s requests are larger than the free room on every machine. Reduce the requests, free room by removing other Pods, or add machines.

Machine warnings not tolerated

Machines can carry warnings, called taints, that repel Pods. The message mentions untolerated taints. Either the Pod needs a matching tolerance, or it should be sent to different machines.

Machine labels do not match

The Pod asked for machines with a particular label, and none exist. The message mentions a node selector or affinity mismatch. Check the label spelling and whether such machines exist.

Storage claim is not bound

The Pod uses a storage claim that has not been given a disk. The message mentions unbound claims. Describe the claim next to find out why it is waiting.

Quota exceeded

If the team’s namespace is out of allowance, the Pod may never be created at all, and the message appears in the events of the owning object, such as the ReplicaSet, not the Pod itself.

flowchart TD
  P["Pod is Pending"] --> M{"Machine name shown in report?"}
  M -->|"No"| S["Read FailedScheduling event"]
  M -->|"Yes"| C["Read container states"]
  S --> R1["Insufficient resources"]
  S --> R2["Untolerated taints"]
  S --> R3["Label or affinity mismatch"]
  S --> R4["Unbound storage claim"]
  C --> R5["Waiting for image download"]
  C --> R6["Waiting for volume to attach"]
        
FIG 3 — A quick map for diagnosing a Pending Pod
Simple Analogy

A Pending Pod is like a guest arriving at a hotel where the receptionist says “no room yet”. The receptionist’s note might read: all rooms are full, the only room is reserved for another group, or the guest asked for a sea view that does not exist. Describe shows you that note.

11Solving Problem Two: Image and Crash Failures

These are the most famous status words in Kubernetes, and describe explains each of them.

ImagePullBackOff and ErrImagePull

The machine could not download the container image. The events name the image and the reason. Typical causes are a misspelled image name, a version tag that does not exist, a private registry that requires credentials which are missing or wrong, or a registry that cannot be reached from the machine. The word BackOff simply means Kubernetes is waiting longer between each new attempt.

CrashLoopBackOff

The container starts, stops quickly, and Kubernetes keeps restarting it with growing delays. The report holds the answer in the container’s last state: the reason and the exit code. The logs of the previous run then explain what the program itself complained about.

Reading exit codes

Exit codeUsual meaningWhere to look next
0The program finished normallyFine for one-off tasks, but a problem for programs that should keep running
1A general application errorThe application logs of the previous run
137The process was forcibly killed, often because memory ran outLook for the reason OOMKilled and compare memory limits with real use
143The process received a polite stop signal and endedUsually normal during shutdown or after a failed health check

OOMKilled: out of memory

When a container uses more memory than its limit, the machine’s kernel stops it. The report shows the reason OOMKilled and usually the exit code 137. The remedy is to raise the memory limit, fix a memory leak in the program, or reduce the work each copy does.

1

Check the container’s current state

Is it Waiting, Running or Terminated, and what reason is shown?

2

Check the last state

Find the reason and exit code of the previous run, which is where the crash is recorded.

3

Check the restart count

A high and rising number confirms that the problem repeats.

4

Read the events

Look for BackOff, Failed or Unhealthy messages that add detail.

5

Turn to the previous logs

Ask for the logs of the previous run of the container, since the current one may be empty or newly started.

i
Good to Know

Describe tells you what the platform saw, such as a kill for memory. The logs tell you what the program said, such as a missing setting. Together they complete the picture, and neither alone is enough for a crashing container.

12Solving Problem Three: Health Checks, Volumes and Services

Some of the most confusing problems involve a Pod that is running but not doing its job.

Failing health checks

Kubernetes can test a container in two important ways. A readiness check decides whether the Pod may receive traffic. A liveness check decides whether the container is alive or should be restarted. When such a check fails, the events show an Unhealthy reason with a message describing the failure, such as a refused connection or a timeout. The container section shows the exact check configuration, including the path, the port, the delay before the first check and how many failures are tolerated.

Two typical patterns appear. If a readiness check fails, the Pod runs but is marked not ready, and the Service ignores it. If a liveness check fails repeatedly, the container is killed and restarted, which shows up as a rising restart count. A very common mistake is a check that starts too early, before the application has finished starting.

Volume problems

If a Pod refers to a settings bundle, a secret bundle or a storage claim that does not exist, the container cannot start, and the events show FailedMount with the missing item named. Fix the name, or create the missing object.

The Service with no endpoints

Selector does not match any Pod

The Service report shows its selector and, next to it, the list of endpoints. If the list says none, compare the selector with the labels of your Pods, character by character. A tiny spelling difference is the classic cause.

Pods match but are not ready

The Pods carry the right labels, but their readiness check is failing, so they are excluded. Describe the Pods to see the failing check.

Wrong target port

Endpoints exist but connections fail, because the Service forwards to a port on which the application does not listen. Compare the target port in the Service with the port in the container section.

flowchart LR
  S["Service report shows selector"] --> Q{"Endpoints listed?"}
  Q -->|"None"| L["Compare selector with Pod labels"]
  L --> R["Check Pods are Ready"]
  Q -->|"Yes but no answer"| T["Compare target port with container port"]
  R --> D["Describe the Pods for failing checks"]
        
FIG 4 — Following the trail when a Service does not answer
Simple Analogy

A Service is like a company’s phone switchboard. If callers get silence, the operator checks three things: are any staff listed for this line, are the listed staff actually at their desks, and is the line connected to the right extension. Describe lets you check all three.

13A Calm Troubleshooting Workflow

When something is broken and people are waiting, a fixed routine beats improvisation.

1

Confirm the right place

Check the namespace and the cluster you are connected to. Many long investigations begin with looking at the wrong environment.

2

List and spot the unhealthy objects

Find which Pods or Deployments are not in a normal state and note their status words.

3

Describe the most upstream object

Start with the Pod. If the Pod does not even exist, move up to the owning ReplicaSet or Deployment, whose events explain why creation failed.

4

Read from the bottom up

Start at the events, note the Warnings, then confirm with the conditions and the container states.

5

Follow the trail to related objects

If an event points to a claim, a bundle, a node or a Service, describe that object next.

6

Check the logs if the program ran

If containers started and stopped, read the logs of the current and previous runs.

7

Change one thing and re-check

Apply a single fix, then describe again to confirm the events and conditions have improved. Avoid changing many things at once.

i
Good Habit

Save the describe output in your incident notes before making changes. The events may expire, and the saved report becomes a record of what the cluster said at the moment of the problem.

!
Common Mistake

Deleting a failing Pod immediately to “reset” it. The replacement gets a new name, a new history and a fresh, empty events list, which can hide the very cause you needed to see.

14Security and Permissions

Describe only reads, but what it reads can still be sensitive.

What you need permission for

Kubernetes uses role-based access control to decide what each person may read. To describe an object, you need permission to read that object. To see events, you need permission to read events as well. Some reports also fetch related objects, such as the Pods on a node. If any of those permissions is missing, the report is either refused or shown without the missing parts, and an empty events section may simply mean you are not allowed to see them.

What the report can reveal

Exposure 1

Plain environment values

Values typed directly into a container’s environment settings are printed in clear text, including any passwords wrongly placed there.

Exposure 2

Internal structure

Names of services, image locations, machine names and network addresses reveal how your system is arranged.

Exposure 3

Settings bundles

The contents of a settings bundle can appear in its report, which is fine for ordinary settings but not for anything confidential.

Protection

Secrets stay hidden

The report for a secret shows key names and sizes, not the values. Similarly, environment values that come from secrets show only their source.

Sharing output safely

People often paste describe output into chat rooms, tickets and forums to ask for help. Before you do, read it through and remove anything confidential, such as tokens typed into environment values, internal host names or customer identifiers. Treat the report as an internal document.

!
Never Do This

Do not paste unedited describe output from production into public places. It may contain far more about your systems than you realise.

i
Good Habit

Give support and on-call staff read-only roles that include events. They can then diagnose problems quickly without any power to change or delete anything.

15What Describe Cannot Tell You

Every tool has limits. Knowing them stops you from trusting the report too much.

It is a snapshot, not a movie

The report shows the state at the moment you ran it. It does not show a graph of how things changed. For trends over time, you need monitoring tools.

It does not show application internals

Describe knows what the platform saw, such as a crash or a failed check. It does not know why your code misbehaved. That story lives in the logs and in your own instrumentation.

Events expire

As covered earlier, events disappear after about an hour by default, so old problems may leave no trace here.

It does not show live resource use

The report shows requests and limits, which are promises and ceilings, not actual use. To see real consumption of processor and memory, use metrics tools.

The layout is not a stable interface

The wording and order of the report can change with tool versions, so scripts that parse it can break without warning.

It shows only what Kubernetes knows

Problems in the wider world, such as a database outage, a broken external service or a bad network route beyond the cluster, do not appear in a describe report unless they cause a recorded event.

If you need thisUse this instead
Data for a scriptStructured output formats such as data files in standard formats
What the program printedContainer logs, including those of the previous run
Live processor and memory useMetrics tools and monitoring dashboards
History beyond the event lifetimeA logging or event-collection system that stores events longer
Trends and alertsA monitoring and alerting platform

16Anti-patterns to Avoid

These mistakes appear again and again in real teams. Learn to recognise them early.

ANTI-PATTERN-01 Avoid
Problem

Restarting or deleting failing Pods straight away, without describing them first.

Why It’s Harmful

The replacement Pod has a clean history and no events, so the cause may be lost. The same failure then returns, and nobody knows why.

Correct Approach

Describe first, save the output, and only then decide whether a restart is appropriate.

ANTI-PATTERN-02 Avoid
Problem

Scripts and automation that parse describe output to extract values.

Why It’s Harmful

The report is written for humans, and its wording and layout can change. Such scripts break silently after a tool upgrade and may produce wrong decisions.

Correct Approach

Use structured output formats for automation, and keep describe for human investigation.

ANTI-PATTERN-03 Avoid
Problem

Reading only the top of the report and never scrolling to the events.

Why It’s Harmful

The top shows configuration that is usually correct. The actual reason for the failure is normally in the events at the bottom, so the investigation goes in circles.

Correct Approach

Make the events your first stop, then confirm with the conditions and container states.

ANTI-PATTERN-04 Avoid
Problem

Treating an empty events section as proof that nothing went wrong.

Why It’s Harmful

Events expire quickly, and missing permissions can also hide them. The team wrongly dismisses a real problem.

Correct Approach

Check the last state, restart count and conditions, confirm your permissions, and consider storing events in a logging system.

ANTI-PATTERN-05 Avoid
Problem

Pasting unedited production output into public forums or open chat channels.

Why It’s Harmful

It can leak internal names, addresses and any confidential values placed in plain environment settings.

Correct Approach

Review and redact the output first, and keep secrets in proper secret objects rather than plain values.

ANTI-PATTERN-06 Avoid
Problem

Investigating in the wrong namespace or the wrong cluster and concluding that the object does not exist.

Why It’s Harmful

Time is wasted, and someone may wrongly recreate an object that already exists elsewhere.

Correct Approach

Always confirm the current cluster and namespace first, and use the all-namespaces switch when unsure.

17Best Practices and Common Mistakes

A short checklist of good habits, in the order you are likely to need them.

1

Describe before you change anything

Make it a reflex. The report is free, safe and tells you what the cluster believes is happening.

2

Start at the events and Warnings

They are the fastest route to the cause in the majority of problems.

3

Follow the ownership chain

If a Pod is missing, describe its owner. If a Service is silent, describe its Pods. The clue is often one object upstream.

4

Compare healthy and unhealthy copies

Describe a working Pod and a failing Pod of the same application side by side. The difference is usually the answer.

5

Combine with logs and metrics

Use describe for platform-level causes, logs for application-level causes and metrics for real resource use.

6

Preserve the evidence

Save reports and key events in incident notes, and forward events to a long-term store if you need history.

7

Teach the whole team the reading order

A shared routine of status, conditions, container states, events makes every engineer faster and every handover clearer.

!
Frequent Beginner Slip

Fixing the symptom named in the status word without reading the message. ImagePullBackOff, for example, can mean a typo, a missing tag, missing credentials or a blocked network, and each needs a different fix. The message in the events tells you which one you face.

18Real-World and Industry Examples

See how ordinary teams use the report every day.

A failed release at an online retailer

A new version of a checkout service will not start. The engineer describes the Pod and sees an event saying the image tag cannot be found. A typing error in the release pipeline is fixed in minutes, without reading a single log line.

Slow scale-up before a sale

Extra Pods stay Pending during a traffic surge. The report’s events say there is not enough memory on any machine. The team adds machines, and the Pods start moments later.

A restarting service in a bank

A payment service restarts every few minutes. The container’s last state shows it was killed for memory, exit code 137. The team raises its limit and opens a ticket for the developers to investigate the memory growth.

An unreachable internal tool

An internal dashboard returns errors. The Service report lists no endpoints. Comparing labels reveals that the Deployment was renamed and the Service selector was never updated.

A machine acting strangely

Several applications on one machine slow down. The node report shows a disk pressure condition. The platform team clears space and adds a cleanup rule, and the condition returns to normal.

A batch job that never ran

A nightly report was not produced. The scheduled job’s report shows repeated failures to mount a settings bundle that had been deleted. Recreating the bundle fixes the schedule.

Onboarding new engineers

A support team teaches every newcomer the same first five minutes of investigation: list, describe, read events, check conditions, then logs. Handovers between shifts become faster because everyone speaks the same language.

19Advantages and Trade-offs

Every tool has strengths and limits. Knowing both keeps your expectations realistic.

Advantages

  • Gathers configuration, status and events into one readable page
  • Read-only and therefore safe to run at any time
  • Often names the exact cause of a failure within seconds
  • Works for almost every kind of Kubernetes object
  • Needs no extra tools beyond the standard command-line client
  • Easy to share as evidence when asking colleagues for help

Disadvantages / Trade-offs

  • Events expire quickly, so old problems may leave no trace
  • Only a snapshot, with no history or trends
  • Layout is meant for humans and unsuitable for scripts
  • Says nothing about what happens inside the application
  • Can expose sensitive values if shared carelessly
  • Very long output for large objects can be hard to read
Simple Analogy

Describe is like a doctor’s examination during a visit. It is thorough and immediate, but it captures only how the patient is today. For long-term health, you need regular check-ups and monitoring, which in Kubernetes means metrics, logs and stored events.

20Frequently Asked Questions

Quick answers to the questions beginners ask most often.

Q1What does kubectl describe actually do?

It reads an object and related information from the cluster and prints a readable report with the object’s settings, status, conditions and recent events.

Q2Can describe change or damage anything?

No. It is strictly read-only, so it is safe to run on any cluster, at any time.

Q3What is the difference between get and describe?

Get gives a short list or the raw stored data, while describe gives a readable report that also includes related events and helpful context.

Q4Why is the events section empty?

Events are kept for a short time, about an hour by default, so old ones may have expired. It can also mean you do not have permission to read events.

Q5Which part of the report should I read first?

Read the events at the bottom first, especially the Warnings. Then check the conditions and the container states to confirm what they suggest.

Q6Why does my container say Running but keep restarting?

It is probably crashing and being restarted. Check the restart count and the last state for the reason and exit code of the previous run.

Q7What does exit code 137 mean?

The process was forcibly killed. It is most often caused by running out of memory, in which case the reason shows as OOMKilled.

Q8Can I describe many objects at once?

Yes. You can use a name prefix, a label selector, a definition file or an all-namespaces switch. Keep the scope small so the output remains readable.

Q9Does describe show secret values?

No. For secrets it shows key names and sizes, and for environment values that come from secrets it shows only the source, not the value.

Q10Should I use describe in scripts?

No. Its layout is designed for people and may change. Use structured output formats when a script needs data.

Q11Why does describe say the object is not found?

Most often you are in the wrong namespace or connected to the wrong cluster, or the name is misspelled. Check those first.

Q12Is describe enough to fix every problem?

No. It explains what the platform saw. For application errors you also need logs, and for real resource use and trends you need metrics tools.

21Summary and Key Takeaways

You began this guide at a garage, where a good mechanic does a full inspection instead of glancing at the dashboard. The kubectl describe command is that inspection for Kubernetes. It asks the cluster for an object and its related information, arranges everything into a readable report, and adds the diary of recent events that so often names the cause of a problem. You learned how the report is put together, how to read a Pod report section by section, what the reports of nodes, Deployments and Services highlight, and how to solve the classic problems: Pods stuck in Pending, image failures, crash loops, memory kills, failing health checks and Services with no endpoints. You also learned its limits, since events expire and the report is only a snapshot, and how to use it safely and sensibly alongside logs and metrics.

Key Takeaways

  • Describe tells the full story — one readable report with settings, status, conditions and events, where a plain listing gives only a summary.
  • It is read-only and safe — you can run it any time without changing anything in the cluster.
  • Events are the best clue — read the Warnings at the bottom first, then confirm with conditions and container states.
  • Check last state and restart count — they reveal crashes that a healthy-looking current state hides, including out-of-memory kills.
  • Follow the trail — describe the Pod, then its owner, its node, its storage claim or its Service, wherever the events point.
  • Know the limits — events expire after about an hour by default, the report is a snapshot, and it does not show application internals or live resource use.
  • Use it wisely and safely — combine it with logs and metrics, never rely on its layout in scripts, and redact the output before sharing it.