kubernetes – Excluding “kubectl get pods” RESTARTS column from command output
I’m running the following query:
$ kubectl get pods -o wide -n logging-app-global --field-selector=status.phase=Running --show-labels
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES LABELS
ax-fmrsp-rpt-6c476796-gzsvv 1/1 Running 1 (5h40m ago) 5h40m 10.127.3.187 ip-10-127-3-187.ec2.internal app=ax-fmrsp-rpt,pod-template-hash=6c476796
ax-manager-logging-sp-766574f4f9-6f8gb 1/1 Running 0 5h40m 10.127.2.87 ip-10-127-2-87.ec2.internal app=ax-manager-logging-sp,pod-template-hash=766574f4f9
I’m wondering if there is a programmatic way to exclude the RESTARTS column from output (e.g. awk), instead of implementing -o custom-columns and defining all above listed columns.
Read more here: Source link
