◻️master&node側でk3sのインストールを行う。
wget https://github.com/rancher/k3s/releases/download/v0.3.0/k3s-armhf && \
chmod +x k3s-armhf && \
sudo mv k3s-armhf /usr/local/bin/k3s
◻️master側で実施
root@rasp01:~# sudo cat /var/lib/rancher/k3s/server/node-token
K10f6b6658c57b3746e62e66cf97d5d44357f9a552da862204e1c7d22fb75f6ee12::node:8fa426db4b28657934d8be98eb023345
◻️node側で実施
export NODE_TOKEN="K10f6b6658c57b3746e62e66cf97d5d44357f9a552da862204e1c7d22fb75f6ee12::node:8fa426db4b28657934d8be98eb023345"
$ export SERVER_IP="https://192.168.13.2:6443"
$ sudo -E k3s agent -s ${SERVER_IP} -t ${NODE_TOKEN}
<master側のIP>
https://192.168.13.2:6443
◻️master側で以下のコマンドを実施してみると、node側と同期できていることが分かる。
root@rasp01:~# sudo k3s kubectl get node -o wide
======================================
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
rasp01 Ready <none> 5h16m v1.13.5-k3s.1 192.168.13.2 <none> Raspbian GNU/Linux 9 (stretch) 4.14.98-v7+ containerd://1.2.4+unknown
rasp02 Ready <none> 6m46s v1.13.5-k3s.1 192.168.13.3 <none> Raspbian GNU/Linux 9 (stretch) 4.14.98-v7+ containerd://1.2.4+unknown
======================================
0 件のコメント:
コメントを投稿