I have been wanting to do the same and try to put everything in LXC and not use VMs so much in a low power cluster, so that the bare minimum resources are used. Have you tried:
https://www.adventuresintech.org/from-zero-to-k3s-on-proxmox-lxc-part-1/
I have just followed this guide and successfully installed k3s on Proxmox 8.2.4 with kernel 6.8.12, which is currently the latest.
On the guide, be careful of the single dash -arguments that should be double dash --arguments for things to work. I emailed the author. Also, I ignored the br_netfilter and overlay errors in the service script /etc/systemd/system/k3s.service, and commented their ExecStartPre lines out, so the status looks like:
Code:
# systemctl status k3s.service
* k3s.service - Lightweight Kubernetes
Loaded: loaded (/etc/systemd/system/k3s.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2024-09-10 11:36:26 UTC; 1h 59min ago
Docs: https://k3s.io
Process: 9144 ExecStartPre=/bin/sh -xc ! /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service 2>/dev/null (code=exited, >
Main PID: 9146 (k3s-server)
Tasks: 82
Memory: 511.7M
CPU: 5min 49.035s
CGroup: /system.slice/k3s.service
|- 7724 /var/lib/rancher/k3s/data/e50868881d9744d0d0027dda983507e867b3787482eb00005d97239d9aa501a5/bin/containerd-shim->
|- 7742 /var/lib/rancher/k3s/data/e50868881d9744d0d0027dda983507e867b3787482eb00005d97239d9aa501a5/bin/containerd-shim->
|- 8534 /var/lib/rancher/k3s/data/e50868881d9744d0d0027dda983507e867b3787482eb00005d97239d9aa501a5/bin/containerd-shim->
|- 9146 /usr/local/bin/k3s server
|- 9161 containerd
`-10607 /var/lib/rancher/k3s/data/e50868881d9744d0d0027dda983507e867b3787482eb00005d97239d9aa501a5/bin/containerd-shim->
From mac laptop:
Code:
% export KUBECONFIG=`pwd`/kubeconfig
% kubectl version
Client Version: v1.30.4
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.30.4+k3s1
% kubectl get nodes
NAME STATUS ROLES AGE VERSION
kube-master Ready control-plane,master 137m v1.30.4+k3s1
kube-worker-1 Ready <none> 114m v1.30.4+k3s1