Skip to content

Instantly share code, notes, and snippets.

@arbal
Forked from Monarch73/installmicrok8s.md
Created December 11, 2024 16:15
Show Gist options
  • Save arbal/1d647d643684cee0edf61e2e63ba27ea to your computer and use it in GitHub Desktop.
Save arbal/1d647d643684cee0edf61e2e63ba27ea to your computer and use it in GitHub Desktop.
Install microk8s in proxmox

Installing microk8s in an LXC container (i.e.: proxmox)

This is an roundition of https://gist.github.com/acj/3cb5674670e6145fa4f355b3239165c7 which got a bit messy

  1. Create a LXC container through the Proxmox web interface (ie.: ubuntu.23-10-lts)
    • untick "unpriviledged" container
    • in memory, set swap to 1024
    • set mem to at least 4096
    • in network, make sure you assign static ip-adress to the container
    • create container but don't start it.
    • after create, go to options and tick "fuse" and "nesting"
    • in /etc/pve/lxc/*.conf add these lines:
      • lxc.apparmor.profile: unconfined
      • lxc.cap.drop:
      • lxc.mount.auto: proc:rw sys:rw
      • lxc.mount.entry: /dev/fuse dev/fuse none bind,create=file 0 0
      • lxc.mount.entry: /sys/kernel/security sys/kernel/security none bind,create=file 0 0
    • run container
  2. Setup microk8s
    • inside container start crontab -e command
      • add line "@reboot ln -s /dev/console /dev/kmsg"
    • install required packages
      • apt update && apt upgrade -y && apt install snapd squashfuse fuse sudo -y
    • reboot container
    • install microk8s
      • snap install microk8s --classic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment