kubectl get pod -w

  -w, --watch=false: After listing/getting the requested object, watch for changes. Uninitialized
objects are excluded if no object name is provided.
      --watch-only=false: Watch for changes to the requested object(s), without listing/getting
first.

它类似于linux的watch命令;在list或get一个资源对象后,加上该选项,能够看到它状态的变化。

posted @ 2022-11-02 19:41  cosmoswong  阅读(334)  评论(0编辑  收藏  举报