Ssh Configuration
For controller (raspberypi)
## ssh key generation for ssh without login
$ ssh-keygen
## copy key to workers
$ ssh-copy-id root@192.168.1.51
$ ssh-copy-id root@192.168.1.52
$ ssh-copy-id root@192.168.1.53
$ ssh-copy-id root@192.168.1.54
## pssh (parallel-ssh) install
$ sudo apt update
$ sudo apt install pssh
## make hosts.txt file
$ echo "192.168.1.51" | tee -a hosts.txt
$ echo "192.168.1.52" | tee -a hosts.txt
$ echo "192.168.1.53" | tee -a hosts.txt
$ echo "192.168.1.54" | tee -a hosts.txt
## parallel ssh to all workers
$ parallel-ssh -h hosts.txt -i -l root 'echo "hello"'
NFS Configuration
For controller (raspberypi; nfs-server)
## mount SSD
$ echo "UUID=xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx /mnt/SSD ext4 defaults,nofail 0 2" | sudo tee -a /etc/fstab
$ mount -a
## install nfs server
$ sudo apt update
$ sudo apt install nfs-kernel-server
## nfs configuration @ /etc/exports
$ echo "/mnt/SSD 192.168.1.0/24(rw,sync,no_subtree_check)" | sudo tee -a /etc/exports
## restart nfs server
$ sudo systemctl restart nfs-kernel-server
For worker (Odroid 1,2,3,4; nfs-client)
## install nfs client
$ sudo apt update
$ sudo apt install nfs-common
## mount nfs
$ sudo mkdir -p /mnt/SSD
$ echo "192.168.1.1:/mnt/SSD /mnt/SSD nfs defaults,noatime,x-systemd.automount 0 0" | sudo tee -a /etc/fstab
$ mount -a
Kubernates Configuration
k0s installation
For controller (raspberrypi)
## install k0s
$ curl -sSLf https://get.k0s.sh | sudo sh
## check dependencies
$ sudo k0s sysinfo
In case of dependency check failure, modify boot command (/boot/firmware/cmdline.txt for raspberrypi4)
console=serial0,115200 console=tty1 ... cgroup_enable=memory
## make configuration
$ sudo k0s config create | sudo tee /etc/k0s/k0s.yaml
## if needed modify the configuration
## install controller
$ sudo k0s install controller -c /etc/k0s/k0s.yaml
$ sudo k0s start
## create token for workers
$ sudo k0s token create --role=worker | sudo tee /mnt/SSD/k0s_worker_token
For worker (Odroid 1,2,3,4)
## install k0s
$ curl -sSLf https://get.k0s.sh | sudo sh
## check dependencies
$ sudo k0s sysinfo
In case of dependency check failure, modify boot command (/media/boot/boot.ini for Odroid c4)
setenv bootargs "root=UUID=... systemd.unified_cgroup_hierarchy=0"
## install worker with token
$ sudo k0s install worker --token-file /mnt/SSD/k0s_worker_token
$ sudo k0s start
## check
$ sudo systemctl status k0sworker
k0s kubernates control
## get nodes
$ sudo k0s kubectl get nodes
'Programming > RaspberryPi' 카테고리의 다른 글
RaspberryPi Clustering Setup part1 (0) | 2025.08.12 |
---|---|
Install chrome-driver for RaspberryPI (0) | 2025.02.14 |
Install Nextcloud on RaspberryPi (0) | 2023.03.15 |
Install Owncloud on RaspberryPi (0) | 2023.03.15 |
Rasbian qbittorrent-nox installation (0) | 2019.11.19 |