Skip to content

Latest commit

 

History

History
83 lines (54 loc) · 1.93 KB

SERVER_ADMIN.md

File metadata and controls

83 lines (54 loc) · 1.93 KB

Server Admin

This guide assumes you're on ubuntu.

Update and upgrade the system

sudo apt-get update && \ sudo apt-get full-upgrade -y

Once ran the command above (the full-upgrade or dist-upgrade one) and you are running on SSD, ensure that no new kernel was installed. Should that be the case, or if unsure, visit SSD

Disable SSH w/ password

This guide assumes you've setup already SSH keys to log w/o password on such hosts. Check the linked guide below if you haven't yet.

Update SSH server configuration with:

sudo vi /etc/ssh/sshd_config

Set following values

ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no
PermitRootLogin no

Restart ssh server

sudo service ssh reload

source

How to test

ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no -l

source

Installing Kubernetes with SNAP

For arm, edit sudo vi /boot/firmware/cmdline.txt And add at the end of the line cgroup_enable=memory cgroup_memory=1

Then install with sudo snap install microk8s --classic

Start microk8s upon restart sudo snap start --enable microk8s

Add user to microk8s users' group

sudo usermod -a -G microk8s ubuntu
sudo chown -f -R ubuntu ~/.kube
su - ubuntu

Aliases

echo "alias k='microk8s kubectl'
alias kubectl='microk8s kubectl'
alias helm='microk8s helm3'" > ~/.bash_aliases
source ~/.bash_aliases

Hosts and hostnames

Change hostname via sudo vi /etc/hostname with pi-(one|two...)

And then host via sudo vi /etc/hosts

192.168.0.10 pi-one
192.168.0.11 pi-two
192.168.0.12 pi-three
192.168.0.13 pi-four