1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

MicroShiftをVagrantで試した際のメモ

Posted at

こちらのチュートリアルに従ってMicroShiftを試した際のメモを記す。
https://community.ibm.com/community/user/cloud/blogs/alexei-karve/2021/11/23/microshift-1

Vagrantfileの用意

以下の fedora/36-cloud-baseVagrantfile を利用する:
https://raw.githubusercontent.com/thinkahead/microshift/094e6f1956378dbea9f87458d63d7f6f7c28093b/vagrant/Vagrantfile.fc36

OpenShiftのAPIサーバーにCLIから接続するために、VMの6443番ポートへのフォワード設定を Vagrantfile に追加する:

config.vm.network :forwarded_port, guest: 6443, host: 6443, id: "cli"

VMの起動

ホスト上で以下のコマンドを実行:

vagrant up
vagrant ssh

MicroShiftのセットアップ

VM上で以下のコマンドを実行:

sudo su -
./w.sh
./okd-web-console-install.sh

接続確認

CLI

以下のコマンドをホスト上で実行し、ホスト上にkubeconfigファイルを作成する:

vagrant ssh -c "sudo cat /var/lib/microshift/resources/kubeadmin/kubeconfig" > ./kubeconfig-mac

参考:https://rheb.hatenablog.com/entry/2022/06/24/162156

OpenShift CLIがAPIサーバーに疎通するのを確認する:

oc --kubeconfig=./kubeconfig get nodes

Webコンソールの表示

ホスト上の /etc/hosts に以下のエントリを追加する:

127.0.0.1 console-np-service-kube-system.cluster.local

ブラウザから以下のURLにアクセスする:

http://console-np-service-kube-system.cluster.local
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?