| ページ一覧 | ブログ | twitter |  書式 | 書式(表) |

MyMemoWiki

差分

ナビゲーションに移動 検索に移動
612 バイト追加 、 2020年11月23日 (月) 12:11
*kubectl exec でそれぞれのpodにhostname コマンドを実行する
<blockquote>
永続化Volumeが、hostPath指定の場合、1つのPodからしか接続できないため立ち上がらない。
</blockquote>
<pre>
$ for i in 0 1; do kubectl exec pod/web-$i hostname; done
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
web-0
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
Error from server (BadRequest): pod web-1 does not have a host assigned
An error occurred when trying to execute 'sudo microk8s.kubectl exec pod/web-1 hostname' with 'multipass': returned exit code 1.
</pre>

案内メニュー