I wanted to run Microk8s on a Proxmox 6 host inside of an LXC container. These are my notes from the journey.
- Create a privileged LXC container through the Proxmox web interface
- Enable nesting and FUSE
- In Proxmox UI, select container, then Options > Features > Check nesting and FUSE boxes
- SSH into the Proxmox host and edit the container's config in /etc/pve/lxc/.conf
- Add the following lines
- lxc.apparmor.profile: unconfined
- lxc.cap.drop:
- lxc.mount.auto: proc:rw sys:rw
- Add the following lines
- Start (or restart) the container
- SSH into the container and create a symlink for /dev/kmsg, which is missing in Ubuntu 19.10 containers
- ln -s /dev/console /dev/kmsg
- Has to be repeated on container reboot, which is annoying.
- Install snapd: apt install snapd
- Install microk8s: snap install microk8s --classic
The snap commands may need to be run more than once to get past errors.
If you get "cannot change profile for the next exec call: No such file or directory", try running: apparmor_parser -r /var/lib/snapd/apparmor/profiles/*
After two days of trying EVERYTHING, this is how i made it work on Proxmox 8.0.3:
1- Download debian 12 (debian-12-standard_12.2-1_amd64.tar.zst) ct template ( i don't know why, but i couldn't make it work with ubuntu ):
pveam download local debian-12-standard_12.2-1_amd64.tar.zst
2- Make a new CT with the following configurations:
NOTE: Don't start the CT yet.
3- On the created CT go to options tab, double click on "Features" and enable "Fuse" and "Nesting".
4- SSH into your Proxmox node and navigate to
/etc/pve/lxc/
, and open your{ct_id}.conf
and add these few lines in:5- Start the CT
6- Open your crontab using
crontab -e
and add this line at the end:7- Install required apt packages:
8- Reboot for changes to take effect.
9- After the reboot, finally you can install microk8s:
10- Enjoy your first microk8s on Proxmox 🎉