This is a snap of k3s, a fully conformant production-ready Kubernetes distribution.
Install
To install the snap from the store use:
snap install k3s-dbruno --edge --devmode
After installation a couple of small tweaks are required:
Create the /run/user/0/snap.k3s dir
sudo mkdir -p /run/user/0/snap.k3s sudo chmod 700 /run/user/0
Download and parse the cri-containerd apparmor profile
sudo wget https://raw.githubusercontent.com/dbruno74/k3s-dbruno/main/cri-containerd.apparmor.d -O /var/lib/snapd/apparmor/profiles/cri-containerd.apparmor.d sudo apparmor_parser -r /var/lib/snapd/apparmor/profiles/cri-containerd.apparmor.d
Alternatively, you can download the install-k3s-dbruno.sh script and run on your host:
sudo wget https://raw.githubusercontent.com/dbruno74/k3s-dbruno/main/install-k3s-dbruno.sh
chmod 755 install-k3s-dbruno.sh
./install-k3s-dbruno.sh
Note: if your host is Ubuntu Core, wget is not available, you can use wget-simosx snap instead
snap install wget-simosx
Run
*k3s server*
Just start the k3s-daemon service
snap start k3s-dbruno.k3s-daemon
k3s will be launched with the "server" parameter. In case you want to change the k3s service command line, use snap set
snap set k3s-dbruno k3s-cmd-line="server --node-name k3s-server"
To print k3s daemon logs:
snap logs k3s-dbruno.k3s-daemon -f
To stop the server:
snap stop k3s-dbruno.k3s-daemon
*k3s agent*
Set the k3s daemon command line first
snap set k3s-dbruno k3s-cmd-line="agent --server https://<k3s server address>:6443 --token <k3s server's token>"
To get the k3s server token, login to k3s server at , then:
sudo cat /var/snap/k3s/current/var/lib/rancher/k3s/server/token
Then start the k3s-daemon service
snap start k3s-dbruno.k3s-daemon
To print k3s daemon logs:
snap logs k3s-dbruno.k3s-daemon -f
To stop the server:
snap stop k3s-dbruno.k3s-daemon
Contribute
Please contribute on github: https://github.com/dbruno74/k3s-dbruno
You are about to open
Do you wish to proceed?
Thank you for your report. Information you provided will help us investigate further.
There was an error while sending your report. Please try again later.
Snaps are applications packaged with all their dependencies to run on all popular Linux distributions from a single build. They update automatically and roll back gracefully.
Snaps are discoverable and installable from the Snap Store, an app store with an audience of millions.
On Debian 9 (Stretch) and newer, snap can be installed directly from the command line:
sudo apt update
sudo apt install snapd
After this, install the snapd snap in order to get the latest snapd:
sudo snap install snapd
To install k3s-dbruno, simply use the following command:
sudo snap install k3s-dbruno --edge
Browse and find snaps from the convenience of your desktop using the snap store snap.
Interested to find out more about snaps? Want to publish your own application? Visit snapcraft.io now.