title: Kubectl command to list pods of a deployment in Kubernetes
body: <p>Is there a way to use <code>kubectl</code> to list only the pods belonging to a deployment?
  Currently, I do this to get pods:</p>
  <p><code>kubectl get pods| grep hello</code></p>
  <p>But it seems an overkill to get ALL the pods when I am interested to know only the pods for a given deployment. I use the output of this command to see the status of all pods, and then possibly exec into one of them.</p>
  <p>I also tried <code>kc get -o wide deployments hellodeployment</code>, but it does not print the Pod names.</p>