Get nodes and pods by selector in Kubernetes

Nodes:

kubectl get nodes --selector beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux
Pods:
kubectl get pods --selector app=App1,tier=frontend
You can also use -l (labels) option, it is the same - it supports '=', '==', and '!='