0
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.

おうちkubernetes構築記① dockerのインストール

Last updated at Posted at 2022-06-01

おうちkubernetesの構築した記録を備忘録 兼 手順書として残しておきます。※この内容は、master/worker双方に同じように設定する必要があります。

環境

S/W

  • OS     : Ubuntu22.04
  • docker    : 20.10.12
  • kubernetes  : 1.24.1
  • terterm    :4.106

H/W

  • 本体     :rasberry Pi4 8GB × 2
  • ルータ    :LINKSYS 5PORT
  • SDカード   :64GB

1. dockerのインストール

  • dockerをubuntuにインストールする。
  1. 以下のコマンドを実行する。
$ sudo apt-get install -y docker.io
  1. インストールが始まるので、しばらく待つ。
パッケージを事前設定しています ...
以前に未選択のパッケージ pigz を選択しています。
(データベースを読み込んでいます ... 現在 157946 個のファイルとディレクトリがインストールされています。)
.../0-pigz_2.6-1_arm64.deb を展開する準備をしています ...
  1. インストールが完了すると、以下のコマンドを実行し、状態を確認する。
$ sudo systemctl status docker
  1. 以下の様に、緑文字で、「active (running)」と表示されていることを確認する。
    image.png

以上

2. dockerの設定

  • dockerコマンドをsudoを利用しなくても実行可能にする。
  1. 以下のコマンドを実行する。
$ sudo usermod -aG docker ${USER}
  1. 上記コマンドが何も表示されず終了したら、以下のコマンドを実行する。
$ su - ${USER}

3.動作確認

  • インストールしたdockerが正常に動作することを確認。
  1. 以下のコマンドを実行する。
$ docker run hello-world

2. しばらく待つと、以下の内容が表示されることを確認する。
image.png

  1. 以下のコマンドを実行し、ダウンロードしたimageが一覧に表示されていることを確認する。
$ docker images
  1. 以下の内容が表示されることを確認する。
    image.png

以上

次回は、kubernetesのインストール手順になります。

0
1
1

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
0
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?