简体   繁体   中英

List node of kubectl pod

I have been following tutorial at https://cloud.google.com/container-engine/docs/tutorials/guestbook#step_four_create_the_redis_worker_service

After creating a pod (redis pod), when I tried to get the node

using the folloiwng command

  $ kubectl get pods -l name=redis-master -o wide

I don't see any output. It is just blank

The name is a metadata, not a label in the example.

Try the following:

kubectl get pods -l app=redis,role=master -o wide 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM