0

minikubeのポッドでシェルを取得する

環境

windows10 home
minikube

前提

k8とかdockerについて学んでいきたい。
その過程でminikubeにたどり着き、
実行中のポッドでシェルを取得し弄りたくなった。

問題発生

minikube dashboard

して、dashboard上でポッドのExecを押したのだが、
何らかの問題発生によってシェルが表示されない。困った。

解決

minikubeのポッドでシェルを取得する方法には二つある。

1.dashboardでExecをしてブラウザ上でシェルする
2.kubectl execする

1は無理だった。
2で解決した。
以下のコマンドを実行すると、シェルを取得できた。

C:\xxx>kubectl exec -it httpd -- /bin/bash
root@httpd:/usr/local/apache2#
Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away