How to filter the running nodes
问题 I want to filter the running nodes list . I tried below command but its only showing running status.I need to filter with it name..Any help ? [root@techsl]# kubectl get nodes -o jsonpath='{range .items[ ]}{@.metadata.name}:{range @.status. enter code here conditions[ ]}{@.type}={@.status};{end}{end}'| tr ';' "\n" | grep "Ready=True" 回答1: Something like this is easier: kubectl get nodes | grep -v NotReady | awk '{print $1}' | tail -n2 server1 server3 kubectl get nodes NAME STATUS ROLES AGE