lxc and microk8s - system does not fully support snapd

Muehlental

New Member
Mar 20, 2024
6
0
1
I am trying to set up kubernetes on an lxc node (imgae: turnkey-linuy core). I installed snapd and then tried to install microk8s.
I get the following messages:

root@lxc-k8s-node1 ~# apt install snapd
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
apparmor dbus-user-session liblzo2-2 libpam-systemd squashfs-tools
Suggested packages:
apparmor-profiles-extra apparmor-utils zenity | kdialog
The following NEW packages will be installed:
apparmor dbus-user-session liblzo2-2 libpam-systemd snapd squashfs-tools
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 16.0 MB of archives.
After this operation, 65.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian bookworm/main amd64 libpam-systemd amd64 252.22-1~deb12u1 [225 kB]
Get:2 http://deb.debian.org/debian bookworm/main amd64 apparmor amd64 3.0.8-3 [616 kB]
Get:3 http://deb.debian.org/debian bookworm/main amd64 dbus-user-session amd64 1.14.10-1~deb12u1 [78.1 kB]
Get:4 http://deb.debian.org/debian bookworm/main amd64 liblzo2-2 amd64 2.10-2 [56.9 kB]
Get:5 http://deb.debian.org/debian bookworm/main amd64 squashfs-tools amd64 1:4.5.1-1 [183 kB]
Get:6 http://deb.debian.org/debian bookworm/main amd64 snapd amd64 2.57.6-1+b5 [14.9 MB]
Fetched 16.0 MB in 6s (2607 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libpam-systemd:amd64.
(Reading database ... 27995 files and directories currently installed.)
Preparing to unpack .../0-libpam-systemd_252.22-1~deb12u1_amd64.deb ...
Unpacking libpam-systemd:amd64 (252.22-1~deb12u1) ...
Selecting previously unselected package apparmor.
Preparing to unpack .../1-apparmor_3.0.8-3_amd64.deb ...
Unpacking apparmor (3.0.8-3) ...
Selecting previously unselected package dbus-user-session.
Preparing to unpack .../2-dbus-user-session_1.14.10-1~deb12u1_amd64.deb ...
Unpacking dbus-user-session (1.14.10-1~deb12u1) ...
Selecting previously unselected package liblzo2-2:amd64.
Preparing to unpack .../3-liblzo2-2_2.10-2_amd64.deb ...
Unpacking liblzo2-2:amd64 (2.10-2) ...
Selecting previously unselected package squashfs-tools.
Preparing to unpack .../4-squashfs-tools_1%3a4.5.1-1_amd64.deb ...
Unpacking squashfs-tools (1:4.5.1-1) ...
Selecting previously unselected package snapd.
Preparing to unpack .../5-snapd_2.57.6-1+b5_amd64.deb ...
Unpacking snapd (2.57.6-1+b5) ...
Setting up liblzo2-2:amd64 (2.10-2) ...
Setting up apparmor (3.0.8-3) ...
Created symlink /etc/systemd/system/sysinit.target.wants/apparmor.service -> /lib/systemd/system/apparmor.service.
Setting up libpam-systemd:amd64 (252.22-1~deb12u1) ...
Setting up squashfs-tools (1:4.5.1-1) ...
Setting up dbus-user-session (1.14.10-1~deb12u1) ...
Setting up snapd (2.57.6-1+b5) ...
Created symlink /etc/systemd/system/multi-user.target.wants/snapd.aa-prompt-listener.service -> /lib/systemd/system/snapd.aa-prompt-listener.service.
Created symlink /etc/systemd/system/multi-user.target.wants/snapd.apparmor.service -> /lib/systemd/system/snapd.apparmor.service.
Created symlink /etc/systemd/system/multi-user.target.wants/snapd.recovery-chooser-trigger.service -> /lib/systemd/system/snapd.recovery-chooser-trigger.service.
Created symlink /etc/systemd/system/multi-user.target.wants/snapd.seeded.service -> /lib/systemd/system/snapd.seeded.service.
Created symlink /etc/systemd/system/cloud-final.service.wants/snapd.seeded.service -> /lib/systemd/system/snapd.seeded.service.
Unit /lib/systemd/system/snapd.seeded.service is added as a dependency to a non-existent unit cloud-final.service.
Created symlink /etc/systemd/system/multi-user.target.wants/snapd.service -> /lib/systemd/system/snapd.service.
Created symlink /etc/systemd/system/sockets.target.wants/snapd.socket -> /lib/systemd/system/snapd.socket.
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for dbus (1.14.10-1~deb12u1) ...
Processing triggers for libc-bin (2.36-9+deb12u7) ...
[master 0663023] committing changes in /etc made by "apt install snapd"
170 files changed, 6118 insertions(+)
create mode 100644 X11/Xsession.d/20dbus_xdg-runtime
create mode 100644 apparmor.d/abi/3.0
create mode 100644 apparmor.d/abi/kernel-5.4-outoftree-network
create mode 100644 apparmor.d/abi/kernel-5.4-vanilla
create mode 100644 apparmor.d/abstractions/X
create mode 100644 apparmor.d/abstractions/apache2-common
create mode 100644 apparmor.d/abstractions/apparmor_api/change_profile
create mode 100644 apparmor.d/abstractions/apparmor_api/examine
create mode 100644 apparmor.d/abstractions/apparmor_api/find_mountpoint
create mode 100644 apparmor.d/abstractions/apparmor_api/introspect
create mode 100644 apparmor.d/abstractions/apparmor_api/is_enabled
create mode 100644 apparmor.d/abstractions/aspell
create mode 100644 apparmor.d/abstractions/audio
create mode 100644 apparmor.d/abstractions/authentication
create mode 100644 apparmor.d/abstractions/base
create mode 100644 apparmor.d/abstractions/bash
create mode 100644 apparmor.d/abstractions/consoles
create mode 100644 apparmor.d/abstractions/crypto
create mode 100644 apparmor.d/abstractions/cups-client
create mode 100644 apparmor.d/abstractions/dbus
create mode 100644 apparmor.d/abstractions/dbus-accessibility
create mode 100644 apparmor.d/abstractions/dbus-accessibility-strict
create mode 100644 apparmor.d/abstractions/dbus-network-manager-strict
create mode 100644 apparmor.d/abstractions/dbus-session
create mode 100644 apparmor.d/abstractions/dbus-session-strict
create mode 100644 apparmor.d/abstractions/dbus-strict
create mode 100644 apparmor.d/abstractions/dconf
create mode 100644 apparmor.d/abstractions/dovecot-common
create mode 100644 apparmor.d/abstractions/dri-common
create mode 100644 apparmor.d/abstractions/dri-enumerate
create mode 100644 apparmor.d/abstractions/enchant
create mode 100644 apparmor.d/abstractions/exo-open
create mode 100644 apparmor.d/abstractions/fcitx
create mode 100644 apparmor.d/abstractions/fcitx-strict
create mode 100644 apparmor.d/abstractions/fonts
create mode 100644 apparmor.d/abstractions/freedesktop.org
create mode 100644 apparmor.d/abstractions/gio-open
create mode 100644 apparmor.d/abstractions/gnome
create mode 100644 apparmor.d/abstractions/gnupg
create mode 100644 apparmor.d/abstractions/gtk
create mode 100644 apparmor.d/abstractions/gvfs-open
create mode 100644 apparmor.d/abstractions/hosts_access
create mode 100644 apparmor.d/abstractions/ibus
create mode 100644 apparmor.d/abstractions/kde
create mode 100644 apparmor.d/abstractions/kde-globals-write
create mode 100644 apparmor.d/abstractions/kde-icon-cache-write
create mode 100644 apparmor.d/abstractions/kde-language-write
create mode 100644 apparmor.d/abstractions/kde-open5
create mode 100644 apparmor.d/abstractions/kerberosclient
create mode 100644 apparmor.d/abstractions/ldapclient
create mode 100644 apparmor.d/abstractions/libpam-systemd
create mode 100644 apparmor.d/abstractions/likewise
create mode 100644 apparmor.d/abstractions/mdns
create mode 100644 apparmor.d/abstractions/mesa
create mode 100644 apparmor.d/abstractions/mir
create mode 100644 apparmor.d/abstractions/mozc
create mode 100644 apparmor.d/abstractions/mysql
create mode 100644 apparmor.d/abstractions/nameservice
create mode 100644 apparmor.d/abstractions/nis
create mode 100644 apparmor.d/abstractions/nss-systemd
create mode 100644 apparmor.d/abstractions/nvidia
create mode 100644 apparmor.d/abstractions/opencl
create mode 100644 apparmor.d/abstractions/opencl-common
create mode 100644 apparmor.d/abstractions/opencl-intel
create mode 100644 apparmor.d/abstractions/opencl-mesa
create mode 100644 apparmor.d/abstractions/opencl-nvidia
create mode 100644 apparmor.d/abstractions/opencl-pocl
create mode 100644 apparmor.d/abstractions/openssl
create mode 100644 apparmor.d/abstractions/orbit2
create mode 100644 apparmor.d/abstractions/p11-kit
create mode 100644 apparmor.d/abstractions/perl
create mode 100644 apparmor.d/abstractions/php
create mode 100644 apparmor.d/abstractions/php-worker
create mode 100644 apparmor.d/abstractions/php5
create mode 100644 apparmor.d/abstractions/postfix-common
create mode 100644 apparmor.d/abstractions/private-files
create mode 100644 apparmor.d/abstractions/private-files-strict
create mode 100644 apparmor.d/abstractions/python
create mode 100644 apparmor.d/abstractions/qt5
create mode 100644 apparmor.d/abstractions/qt5-compose-cache-write
create mode 100644 apparmor.d/abstractions/qt5-settings-write
create mode 100644 apparmor.d/abstractions/recent-documents-write
create mode 100644 apparmor.d/abstractions/ruby
create mode 100644 apparmor.d/abstractions/samba
create mode 100644 apparmor.d/abstractions/samba-rpcd
create mode 100644 apparmor.d/abstractions/smbpass
create mode 100644 apparmor.d/abstractions/snap_browsers
create mode 100644 apparmor.d/abstractions/ssl_certs
create mode 100644 apparmor.d/abstractions/ssl_keys
create mode 100644 apparmor.d/abstractions/svn-repositories
create mode 100644 apparmor.d/abstractions/ubuntu-bittorrent-clients
create mode 100644 apparmor.d/abstractions/ubuntu-browsers
create mode 100644 apparmor.d/abstractions/ubuntu-browsers.d/chromium-browser
create mode 100644 apparmor.d/abstractions/ubuntu-browsers.d/java
create mode 100644 apparmor.d/abstractions/ubuntu-browsers.d/kde
create mode 100644 apparmor.d/abstractions/ubuntu-browsers.d/mailto
create mode 100644 apparmor.d/abstractions/ubuntu-browsers.d/multimedia
create mode 100644 apparmor.d/abstractions/ubuntu-browsers.d/plugins-common
create mode 100644 apparmor.d/abstractions/ubuntu-browsers.d/productivity
create mode 100644 apparmor.d/abstractions/ubuntu-browsers.d/text-editors
create mode 100644 apparmor.d/abstractions/ubuntu-browsers.d/ubuntu-integration
create mode 100644 apparmor.d/abstractions/ubuntu-browsers.d/ubuntu-integration-xul
create mode 100644 apparmor.d/abstractions/ubuntu-browsers.d/user-files
create mode 100644 apparmor.d/abstractions/ubuntu-console-browsers
create mode 100644 apparmor.d/abstractions/ubuntu-console-email
create mode 100644 apparmor.d/abstractions/ubuntu-email
create mode 100644 apparmor.d/abstractions/ubuntu-feed-readers
create mode 100644 apparmor.d/abstractions/ubuntu-gnome-terminal
create mode 100644 apparmor.d/abstractions/ubuntu-helpers
create mode 100644 apparmor.d/abstractions/ubuntu-konsole
create mode 100644 apparmor.d/abstractions/ubuntu-media-players
create mode 100644 apparmor.d/abstractions/ubuntu-unity7-base
create mode 100644 apparmor.d/abstractions/ubuntu-unity7-launcher
create mode 100644 apparmor.d/abstractions/ubuntu-unity7-messaging
create mode 100644 apparmor.d/abstractions/ubuntu-xterm
create mode 100644 apparmor.d/abstractions/user-download
create mode 100644 apparmor.d/abstractions/user-mail
create mode 100644 apparmor.d/abstractions/user-manpages
create mode 100644 apparmor.d/abstractions/user-tmp
create mode 100644 apparmor.d/abstractions/user-write
create mode 100644 apparmor.d/abstractions/video
create mode 100644 apparmor.d/abstractions/vulkan
create mode 100644 apparmor.d/abstractions/wayland
create mode 100644 apparmor.d/abstractions/web-data
create mode 100644 apparmor.d/abstractions/winbind
create mode 100644 apparmor.d/abstractions/wutmp
create mode 100644 apparmor.d/abstractions/xad
create mode 100644 apparmor.d/abstractions/xdg-desktop
create mode 100644 apparmor.d/abstractions/xdg-open
create mode 100644 apparmor.d/local/README
create mode 100644 apparmor.d/local/lsb_release
create mode 100644 apparmor.d/local/nvidia_modprobe
create mode 100644 apparmor.d/local/usr.lib.snapd.snap-confine.real
create mode 100644 apparmor.d/lsb_release
create mode 100644 apparmor.d/nvidia_modprobe
create mode 100644 apparmor.d/tunables/alias
create mode 100644 apparmor.d/tunables/apparmorfs
create mode 100644 apparmor.d/tunables/dovecot
create mode 100644 apparmor.d/tunables/etc
create mode 100644 apparmor.d/tunables/global
create mode 100644 apparmor.d/tunables/home
create mode 100644 apparmor.d/tunables/home.d/site.local
create mode 100644 apparmor.d/tunables/home.d/ubuntu
create mode 100644 apparmor.d/tunables/kernelvars
create mode 100644 apparmor.d/tunables/multiarch
create mode 100644 apparmor.d/tunables/multiarch.d/site.local
create mode 100644 apparmor.d/tunables/proc
create mode 100644 apparmor.d/tunables/run
create mode 100644 apparmor.d/tunables/securityfs
create mode 100644 apparmor.d/tunables/share
create mode 100644 apparmor.d/tunables/sys
create mode 100644 apparmor.d/tunables/xdg-user-dirs
create mode 100644 apparmor.d/tunables/xdg-user-dirs.d/site.local
create mode 100644 apparmor.d/usr.lib.snapd.snap-confine.real
create mode 100644 apparmor/parser.conf
create mode 100644 apt/apt.conf.d/20snapd.conf
create mode 100755 init.d/apparmor
create mode 100644 profile.d/apps-bin-path.sh
create mode 120000 rcS.d/S01apparmor
create mode 120000 systemd/system/cloud-final.service.wants/snapd.seeded.service
create mode 120000 systemd/system/multi-user.target.wants/snapd.aa-prompt-listener.service
create mode 120000 systemd/system/multi-user.target.wants/snapd.apparmor.service
create mode 120000 systemd/system/multi-user.target.wants/snapd.recovery-chooser-trigger.service
create mode 120000 systemd/system/multi-user.target.wants/snapd.seeded.service
create mode 120000 systemd/system/multi-user.target.wants/snapd.service
create mode 120000 systemd/system/sockets.target.wants/snapd.socket
create mode 120000 systemd/system/sysinit.target.wants/apparmor.service
create mode 100644 xdg/autostart/snap-userd-autostart.desktop
Enumerating objects: 1437, done.
Counting objects: 100% (1437/1437), done.
Compressing objects: 100% (931/931), done.
Writing objects: 100% (1437/1437), done.
Total 1437 (delta 140), reused 1230 (delta 88), pack-reused 0
root@lxc-k8s-node1 ~# snap install microk8s --classic
error: system does not fully support snapd: cannot mount squashfs image using "squashfs": mount:
/tmp/syscheck-mountpoint-3071529701: mount failed: Operation not permitted.
root@lxc-k8s-node1 ~#

Can you help me?

Thank you in advance!
 
I've never even dabbled with Kubernetes - but AFAIK to do so in an LXC you'll have to go with a Privileged LXC, (something I personally wouldn't do. But if you are just homelabbing - maybe you can go for it).

You may want to read up more on the subject - see here & here. There's more out there too.
 
Thank you for your answer. After reading I have come to the conclusion that for the time being it will be better to use a very slim vm like alpine linux. I need docker/kubernetes at the moment for prototyping AI/ML.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!