dguyhasnoname/k8s-day2-ops

useless use of awk

monotek opened this issue · 1 comments

kubectl get nodes --no-headers | awk '{print $1}' > NODES

could be used without awk:

kubectl get nodes -o=jsonpath='{range .items[*]}{.metadata.name}{"\n"}'

or

k get nodes --no-headers -o custom-columns=NAME:.metadata.name

script was updated