custom columns

Print out specific fields as Columns.

Print out specific fields as Columns.

Note: Custom Columns can also be read from a file using -o custom-columns-file.

Command

kubectl get deployments -o custom-columns="Name:metadata.name,Replicas:spec.replicas,Strategy:spec.strategy.type"

Output

Name      Replicas   Strategy
nginx     1          RollingUpdate

Last modified September 30, 2020: SIG CLI docs - guide changes (d705a6d)