2020/11/04
今回できたこと
Kurbenetesに関する情報収集。
RaspberryPi でのKubernetes環境の構築。
RaspberryPi でのminicube環境作成準備。
今後の作業
RaspberryPi でのminicube環境の作成。
お約束
Kubernetes関連の情報収集
Kubernetesの基本的な説明から、minicubeを使った実習まで(slide) https://youtu.be/ig40n5nfMWw
実際の案件で使ったk8sの構成について。現状では、むとうはあまり理解できていない。
https://youtu.be/y30z-rLT3ZM
今後の情報収集予定資料
メンターから紹介された資料は、以下の通り。
実装例
RaspberryPi でのKubernetes環境の構築
注意点
swapの設定があるとkubeadm initが動作しない
code:shell
$ sudo kubeadm init
init Using Kubernetes version: v1.19.3 error execution phase preflight: preflight Some fatal errors occurred: ERROR Swap: running with swap on is not supported. Please disable swap preflight If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=... To see the stack trace of this error execute with --v=5 or higher
code:shell
% sudo swapoff --all
% sudo apt-get purge -y --auto-remove dphys-swapfile
% sudo rm -fr /var/swap
% sudo reboot
cgroupの設定が必要 参考文献に記述あり
cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1の設定追加が必要
code:/boot/cmdline.txt
console=serial0,115200 console=tty1 root=PARTUUID=0e0c7187-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory
RaspberryPi でのminicube環境作成準備
minicubeはソースからビルドする必要あり
code:shell
$ cd ~/github
makeにはGo言語が必要
Go言語のインストール作業
code:shell
$ sudo tar -C /usr/local -xzf go1.10.1.linux-armv6l.tar.gz
code:~/.bashrc
export PATH=$PATH:/usr/local/go/bin
Go言語のライブラリ関連で問題
code:shell
$ cd ~/github/minikube
$ make
package github.com/go-bindata/go-bindata/v3: cannot find package "github.com/go-bindata/go-bindata/v3" in any of:
/usr/local/go/src/github.com/go-bindata/go-bindata/v3 (from $GOROOT)
/home/pi/go/src/github.com/go-bindata/go-bindata/v3 (from $GOPATH)
ライブラリのインストールを試してみるが、現在のところうまく動作していない