Explore the kubectl describe Command
The kubectl describe command is used to show detailed information about a specific resource or group of resources. It provides insights into the resource's configuration, status, and related events.
Run the following command to view the available options for kubectl describe:
kubectl describe -h
You will see the following output:
Show details of a specific resource or group of resources.
Print a detailed description of the selected resources, including related resources such as events or controllers. You
may select a single object by name, all objects of that type, provide a name prefix, or label selector. For example:
$ kubectl describe TYPE NAME_PREFIX
will first check for an exact match on TYPE and NAME_PREFIX. If no such resource exists, it will output details for
every resource that has a name prefixed with NAME_PREFIX.
Use "kubectl api-resources" for a complete list of supported resources.
Examples:
## Describe a node
kubectl describe nodes kubernetes-node-emt8.c.myproject.internal
## Describe a pod
kubectl describe pods/nginx
## Describe a pod identified by type and name in "pod.json"
kubectl describe -f pod.json
## Describe all pods
kubectl describe pods
## Describe pods by label name=myLabel
kubectl describe po -l name=myLabel
## Describe all pods managed by the 'frontend' replication controller
## (rc-created pods get the name of the rc as a prefix in the pod name)
kubectl describe pods frontend