- K3s install and configure k3s on a Raspberry Pi
- x86 or Raspberry Pi server
- SUSE OS installed (SLE 15sp2,SLE Micro, Leap)
sudo zypper up
sudo zypper in which
firewall-cmd --zone=public --add-port=6443/tcp --permanent
firewall-cmd --reload
OR disable and turn off
sudo systemctl disable --now firewalld
We are using the --write-kubeconfig-mode 644 option so the .kube/config file is automatically created
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.19.8+k3s1 K3S_KUBECONFIG_MODE=0644 sh -
The output will look simular to:
[INFO] Finding release for channel stable
[INFO] Using v1.18.8+k3s1 as release
[INFO] Downloading hash https://github.com/rancher/k3s/releases/download/v1.18.8+k3s1/sha256sum-arm64.txt
[INFO] Downloading binary https://github.com/rancher/k3s/releases/download/v1.18.8+k3s1/k3s-arm64
[INFO] Verifying binary download
[INFO] Installing k3s to /usr/local/bin/k3s
[INFO] Creating /usr/local/bin/kubectl symlink to k3s
[INFO] Creating /usr/local/bin/crictl symlink to k3s
[INFO] Creating /usr/local/bin/ctr symlink to k3s
[INFO] Creating killall script /usr/local/bin/k3s-killall.sh
[INFO] Creating uninstall script /usr/local/bin/k3s-uninstall.sh
[INFO] env: Creating environment file /etc/systemd/system/k3s.service.env
[INFO] systemd: Creating service file /etc/systemd/system/k3s.service
[INFO] systemd: Enabling k3s unit
Created symlink /etc/systemd/system/multi-user.target.wants/k3s.service → /etc/systemd/system/k3s.service.
[INFO] systemd: Starting k3s
kubectl get nodes
Example:
NAME STATUS ROLES AGE VERSION
pi-erin-1 Ready master 55s v1.18.9+k3s1
kubectl completion bash >/etc/bash_completion.d/kubectl
Logout and log back in to activate.
First, Follow the instructions to install Helm in the Installation of Kubernetes Tools
You will not need to install kubectl since the k3s install already did that for you.
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
or you can symlink it ensure you have .kube/config in your home directory for tux use
ln -s /etc/rancher/k3s/k3s.yaml /home/tux/.kube/config
Done. Time to move on to adding a workload.