CLI Vault // Micro-dispatches.
Quick search articles, topics, and actions
Showing 1 snippet tagged #jsonpath
Custom-columns is fine, but JSONPath gives you raw output you can pipe straight into other tooling.
kubectl get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}{" "}{.metadata.name}{" "}{.status.podIP}{"
"}{end}' | grep -v NAMESPACE
# Filter to one deployment's pods + their nodeName:
kubectl get pods -l app=my-app -o jsonpath='{range .items[*]}{.metadata.name}{" -> "}{.spec.nodeName}{"
"}{end}'