concept

Inspect resources with kubectl

Use get for object inventory, describe for diagnostic context, logs for container output and explain for server API field documentation. Explicitly scope requests and distinguish a condition from a diagnosis.

Formal Syntax & Structure

kubernetes syntaxkubernetes
Inspect resources with kubectl

Working Example

Example Snippetkubernetes
kubectl --kubeconfig ./lab.kubeconfig --context bytemind-lab -n book-lab describe pod/catalog-bkubectl --kubeconfig ./lab.kubeconfig --context bytemind-lab -n book-lab logs pod/catalog-b -c app --previous --tail=20
Kubernetes Reference