Add column in jsonpath command

Hello eveyone.

I need help about “advanced kubectl commands” lesson

I can’t get the same result as in the video.

master 4
node01 4

I would like to add the column names but I can try much time :without success.

kubectl get nodes -o=custom-columns=“,CPU:.status.capacity.cpu” -o=jsonpath=’{range .items[*]}{}{"\ t"}{.status.capacity.cpu}{"\n"}’ > test.txt

I thank you in advance,

Have a beautiful day

Hello, @hinin
You could try below method -

kubectl get nodes -o=jsonpath="{'NODE'}{'\t'}{'\t'}{'CPU'}{'\n'}{range .items[*]}{'\n'}{}{'\t'}{.status.capacity.cpu}{'\n'}"