kubernetes集群中对多个pod操作命令

  $ for i in 0 1; do kubectl exec web-$i -- sh -c 'echo hello $(hostname) > /usr/share/nginx/html/index.html'; done

posted @ 2019-02-15 15:42  littlevigra  阅读(755)  评论(0编辑  收藏  举报