Sort list output by a JSONPath-like field.

Section: Inspection and Deep Queries

Sort resources

bash
bash
kubectl get pods -n payments --sort-by=.status.startTime
Explanation

Sort list output by a JSONPath-like field.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Inspection and Deep Queries
Custom columns output
Render table output with selected fields.
OpenIn sheetbashsame section
Get JSON output
Dump a resource as JSON.
OpenIn sheetbashsame section
Get YAML output
Dump a resource as YAML.
OpenIn sheetbashsame section
Field selector filter
Filter server-side using field selectors.
OpenIn sheetbashsame section
Label selector filter
Filter resources using labels.
OpenIn sheetbashsame section
Machine-friendly output
Suppress table headers for scripting.
OpenIn sheetbashsame section