Hi , How to get only pod name in kubectl top command?

karthi Mahadev:
Hi ,
How to get only pod name in kubectl top command ?

Harindha Fernando:

ubuntu@host1:~$ kubectl top pod --sort-by='cpu' -n yaobank | awk '{print $1}'
NAME
database-6c5db58d95-8bvb2
summary-85c56b76d7-cbpbc
customer-574bd6cc75-b4kwv
summary-85c56b76d7-jt6q2
ubuntu@host1:~$ 

karthi Mahadev:
Thanks… I forgot about awk and trying with cut