Description
What would you like to be added:
I would like to be able to use the output flag to specify csv format when listing resources. For example:
kubectl get pods -o csv
would output the current pods in a CSV format.
An example of proper CSV format could be
NAME ,READY ,STATUS ,RESTARTS ,AGE
Inky ,1/1 ,Running ,3 ,1d10h
Blinky ,1/1 ,Running ,132 ,2d11h
Pinky ,1/1 ,Running ,2 ,3d12h
Clyde ,1/1 ,Running ,0 ,196d13h
Which in monospace would not only look like properly formatted CSV, but it would also be properly formatted CSV.
This flag would be valid on any resource that is 'get'-able.
Why is this needed:
Not only is this an easy add, as it would be very useful in automation and reporting. Personally, I would be able to perform cluster analysis much faster with this, using something akin to
kubectl get pods -o csv > myreport.csv
where I could then paste in formulas in excel and crunch numbers with my own parser.
Thanks for the consideration!