skip to content
Alvin Lucillo

K8s get custom cols

/ 1 min read

💻 Tech

Retrieving specific data and presenting them as columns can be achived by using -o=custom-columns. The command below returns the pod name and IP under all namespaces. kubectl get pods -A -o=custom-columns='POD_NAME:metadata.name,IP_ADDR:status.podIP' --sort-by=.status.podIP