Created
June 12, 2022 17:26
-
-
Save sasasin/70ff66c6b932b9cca4927d7f6cecdc75 to your computer and use it in GitHub Desktop.
k3s on ubuntu 22.04 on raspberry pi 4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # k3s on ubuntu 22.04 on raspberry pi 4 | |
| # ご自宅のネットワーク事情など鑑みたセットアップを終える | |
| # 全ノードでこれ必須 | |
| # 参考 https://rancher.com/docs/k3s/latest/en/advanced/#enabling-vxlan-on-ubuntu-21.10+-on-raspberry-pi | |
| sudo apt install -y linux-modules-extra-raspi | |
| # ↑ これがわからず3時間溶けた | |
| # だって curl -sfL https://get.k3s.io | sh -s は warning もなしに成功した風なのに、数秒毎に k3s がリブートかかってんだぜ | |
| # あとは quick start のとおり | |
| # control-plain で実行 | |
| curl -sfL https://get.k3s.io | sh -s - --write-kubeconfig-mode 644 | |
| sudo cat /var/lib/rancher/k3s/server/node-token | |
| sudo reboot | |
| # worker-node で実行 | |
| export K3S_TOKEN="↑の中身" | |
| export CONTROL_PLAIN_IP="xxx.xxx.xxx.xxx" | |
| curl -sfL https://get.k3s.io \ | |
| | K3S_URL=https://${CONTROL_PLAIN_IP}:6443 \ | |
| K3S_TOKEN=${K3S_TOKEN} \ | |
| sh - | |
| sudo reboot | |
| # control-plain で実行 | |
| kubectl get node | |
| # k3s は systemd 管理下に置いてくれるので以下で状況確認できる | |
| sudo systemctl status k3s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment