-
Generate SSH key using ED25519 algorithm.
ssh-keygen -
Enable the SSH Agent and set it to start up automatically.
Get-Service ssh-agent | Set-Service -StartupType Automatic -
Start the SSH Agent manually.
Start-Service ssh-agent -
Verify the SSH Agent is running.
Get-Service ssh-agent -
Add the SSH Private Key to the SSH Agent.
ssh-add $env:USERPROFILE\.ssh\id_ed25519 -
Backup the SSH Private Key (e.g., to LastPass or somewhere secure).
-
Delete the SSH Private Key from the local file system.
rm $env:USERPROFILE\.ssh\id_ed25519 -
Copy the SSH Public Key to the clipboard.
cat $env:USERPROFILE\.ssh\id_ed25519.pub | clip -
Add the SSH Public Key to the remote server's Authorized Clients.
-
Generate SSH key using ED25519 algorithm.
ssh-keygen -
Copy the SSH Public Key to the clipboard.
cat $env:USERPROFILE\.ssh\id_ed25519.pub | pbcopy -
Add the SSH Public Key to the remote server's Authorized Clients.
TODO: Need steps for adding to keychain?
- Install Raspberry Pi Imager on machine with internet access (e.g., desktop).
- Insert microSD card into desktop.
- Launch Raspberry Pi Imager.
- Choose device type (e.g., Raspberry Pi Zero W).
- Choose OS (e.g., Raspberry Pi OS Lite 32-bit).
- Choose storage (e.g., microSD card).
- Customize OS Settins.
- Set hostname (e.g.,
pizero1.local). - Set username/password.
- Set WiFi SSID/password.
- Set locale.
- Enable SSH.
- Use public-key authentication only.
- Enter SSH Public Key from client.
- Disable telemetry.
- Set hostname (e.g.,
- Write OS to microSD card.
- Eject microSD card.
-
Insert microSD card into Raspberry Pi.
-
Insert power cable into Raspberry Pi.
-
Login to RaspberryPi from Desktop via SSH.
-
Enable
cgroups-
Append
cgroup_memory=1 cgroup_enable=memoryto/boot/firmware/cmdline.txt -
Reboot to apply the
cgroupschangesshutdown -r
-
-
Install
containerd,runc,rootlesskit, andcontainernetworking-pluginssudo apt install -y containerd runc rootlesskit containernetworking-plugins -
Register
containerdas a service for automatic startup-
Create
systemddirectory if it does not already existsudo mkdir -P /usr/local/lib/systemd/system/ -
Download the
containerd.servicefile and place it into the/usr/local/lib/systemd/system/directorysudo curl https://raw.githubusercontent.com/containerd/containerd/main/containerd.service -o /usr/local/lib/systemd/system/containerd.service -
Refresh
systemdsudo systemctl daemon-reload -
Enable the
containerdservicesudo systemctl enable --now containerd -
Verify the
containerdservice is running normallysystemctl status containerd
-
-
Install
nerdctlby building from source (no existing binary forarmv6lCPU)-
Install
golang-
Download the latest
golangbinary forarmv6l(e.g.,v1.23.8)curl -LO https://go.dev/dl/go1.23.8.linux-arm6l.tar.gz -
Extract the
golangbinary into/usr/localsudo tar -C /usr/local -xzf go1.23.8.linux-armv6l.tar.gz -
Add the
/usr/local/go/bindirectory toPATHbe appending the following line to~/.bashrcexport PATH=$PATH:/usr/local/go/bin -
Refresh the current shell
source ~/.bashrc
-
-
Install
gitsudo apt install git -
Download the
nerdctlsource repository from GitHubgit clone https://github.com/containerd/nerdctl.git -
Change to the directory containing the
nerdctlsource codecd nerdctl -
Checkout the latest release tag (e.g.,
v2.0.4)git checkout -b v2.0.4 v2.0.4 -
Compile
nerdctlmake- If necessary, fix the build errors...
- Edit
nerdctl/Makefile, search for theGO_BUILDvariable definition, and delete the-C ...flag from the command definition. Switch to the directory containing theMakefilebefore running themakecommand. - Edit the
nerdctl/go.modfile, search for the linego <version>, and remove the patch number from the version string (e.g.,1.23not1.23.0).
- Edit
- If necessary, fix the build errors...
-
Install
nerdctlsudo make install
-
-
Install
containerd-rootlesscontainerd-rootless-setup.sh install -
Verify
nerdctlsetupnerdctl version -
Change the default port forwarder to
slirp4netns-
Create the directory
~/.config/systemd/user/containerd.service.dmkdir -P ~/.config/systemd/user/containerd.service.d -
Create a new file named
override.confin the~/.config/systemd/user/containerd.service.ddirectorytouch ~/.config/systemd/user/containerd.service.d/override.conf -
Add the following content to the
~/.config/systemd/user/containerd.service.d/override.conffile[Service] Environment="CONTAINERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER=slirp4netns" -
Reload the service configuration
systemctl --user daemon-reload -
Restart the service
systemctl --user restart containerd
-
-
Allow non-root users to listen on TCP and UDP ports below 1024
-
Create the file
/etc/sysctl.d/99-rootless.confif it does not already existtouch /etc/sysctl.d/99-rootless.conf -
Append the following line to the
/etc/sysctl.d/99-rootless.conffilenet.ipv4.ip_unprivileged_port_start=0 -
Reload the
sysctlconfigurationsudo sysctl --system
-
Refs.:
- https://github.com/containerd/containerd/blob/main/docs/getting-started.md
- https://github.com/containerd/nerdctl?tab=readme-ov-file#install
- https://github.com/containerd/nerdctl?tab=readme-ov-file#compiling-nerdctl-from-source
- https://github.com/containerd/nerdctl/blob/main/docs/rootless.md
- https://rootlesscontaine.rs/getting-started/containerd/#changing-the-port-forwarder
- https://rootlesscontaine.rs/getting-started/common/sysctl/#allowing-listening-on-tcp--udp-ports-below-1024
- https://docs.k3s.io/installation/requirements?os=pi
- https://some-natalie.dev/blog/raspberry-pi-kubernetes/