Basic Installation
Requirements
- The hardware device must be connected to the internet.
- Access to DNS and, optionally, NTP
- Required outbound ports: 443 (https), 8883 (mqtts)
- Optional outbound ports: 1883 (mqtt)
- Optional inbound ports: 8080, 8888 (REST API via http)
Install OS: Ubuntu Server
- The Ubuntu Server LTS (64-bit) download can be found at Download Ubuntu Server
- The version for ARM-based server systems can be found at Ubuntu Server for ARM.
- For Raspberry Pi 4 it is recommended to install Raspberry Pi OS (64-bit, no desktop) to enable
dedicated Raspberry Pi hardware access, however, Ubuntu Server can be used
when this access is not needed; the downloads for Ubuntu Server can be found
at Ubuntu Server for Raspberry Pi. Make sure to
select the 64-bit version.Note: A tutorial for installing Ubuntu Server on Raspberry Pi is also available.
Flashing the downloaded OS image to an SD card or a USB driver can be done using balenaEtcher.
Install K3s on 64-bit Linux
The Edge Compute Platform uses K3s, a lightweight Kubernetes. A 64-bit Linux OS is required for running K3s.
You can use the installation script available at https://get.k3s.io to install K3s as a service on systemd and openrc based systems.
You can also run the following command:
curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" sh -s -
If desired, the installation can be customised using installation options listed in the K3s documentation.
This will install a single-node cluster with one master and one worker.
The k3s service is automatically started after installation.
- kubectl
- crictl
- k3s-killall.sh
- k3s-uninstall.sh
Important Notes when Installing on Raspberry Pi
Before installing K3s on Ubuntu 18.04 on a Raspberry Pi, the file
/boot/firmware/nobtcmd.txt needs to be edited (or
/boot/firmware/btcmd.txt if BlueTooth is enabled) by adding
cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory
to
the end of the line (that is, not on a new line).
On Ubuntu 20.04 or Raspberry Pi OS the file to edit is /boot/firmware/cmdline.txt.
After editing and saving the file, reboot the Raspberry Pi for the changes to take effect.
On Ubuntu 20.10 and newer, the linux-modules-extra-raspi package needs to be installed.
It is strongly advised to turn off swap to enable K3s to manage memory more efficiently.
Connection Issues
If your connection is not getting established, look at the logs for the Management Service to find out what the issue is. To do this, complete the following:
- Retrieve list of pods in the ecp namespace running:
kubectl -n ecp get pods
- Use the name of the "ase-core-management-XXXXX" pods to view logs by using:
kubectl -n ecp logs -f pods/<pod-name>
- If it shows a wrong status, you can delete the pod and see if the new one that
spins up will work:
kubectl -n ecp delete pods/<pod-name>