# Microk8s installation failing on ubuntu 22.10

**URL:** <https://discuss.kubernetes.io/t/microk8s-installation-failing-on-ubuntu-22-10/28578>\
**Category:** microk8s\
**Created:** [June 8, 2024, 1:05pm UTC](https://discuss.kubernetes.io/t/microk8s-installation-failing-on-ubuntu-22-10/28578 "2024-06-08T13:05:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![uday\_kiran](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/uday_kiran/32/15150_2.png) [@uday\_kiran](https://discuss.kubernetes.io/u/uday_kiran)\
**Post date:** [June 8, 2024, 1:05pm UTC](https://discuss.kubernetes.io/t/microk8s-installation-failing-on-ubuntu-22-10/28578/1 "2024-06-08T13:05:53Z")

</div>

`sudo snap install microk8s --classic --channel=1.29/stable`

> error: cannot perform the following tasks:
> 
> - Mount snap “microk8s” (6809) (snap “microk8s” assumes unsupported features: snapd2.52 (try to update snapd and refresh the core snap))

Also same error with below command.

`sudo snap install microk8s --classic --channel=1.30`

> error: cannot perform the following tasks:
> 
> - Mount snap “microk8s” (6876) (snap “microk8s” assumes unsupported features: snapd2.52 (try to update snapd and refresh the core snap))

Already ran this command.  
`sudo snap install core snapd`

> core 16-2.61.2 from Canonical✓ installed  
> snapd already installed

Working for old version 1.18 and 1.19. But not the latest one 1.30.

```auto
sudo snap install microk8s --classic --channel=1.18/stable
sudo snap refresh microk8s --classic --channel=1.19/stable

```

Please suggest.

---

<div class="post-metadata">

**Author:** ![evilnick](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/evilnick/32/3481_2.png) [@evilnick](https://discuss.kubernetes.io/u/evilnick)\
**Post date:** [June 13, 2024, 4:57pm UTC](https://discuss.kubernetes.io/t/microk8s-installation-failing-on-ubuntu-22-10/28578/2 "2024-06-13T16:57:54Z")

</div>

Hi - sorry you are having problems. That seems like a strange one.  
Can you post the output of

```auto
$ SNAPD_DEBUG=1 snap install microk8s --classic

```

and

```auto
$ journalctl -e --no-pager -u snapd

```

?

---

<div class="post-metadata">

**Author:** ![evilnick](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/evilnick/32/3481_2.png) [@evilnick](https://discuss.kubernetes.io/u/evilnick)\
**Post date:** [June 13, 2024, 5:02pm UTC](https://discuss.kubernetes.io/t/microk8s-installation-failing-on-ubuntu-22-10/28578/3 "2024-06-13T17:02:06Z")

</div>

And actually, as a first port of call, I might suspect that something whacky is happening with snapd, so try re-installing that as a first step:

```auto
sudo apt purge snapd 
sudo apt install snapd

```

then try re-installing MicroK8s, and then try the other things

---

<div class="post-metadata">

**Author:** ![marcwittke](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/marcwittke/32/15178_2.png) [@marcwittke](https://discuss.kubernetes.io/u/marcwittke)\
**Post date:** [June 14, 2024, 6:25am UTC](https://discuss.kubernetes.io/t/microk8s-installation-failing-on-ubuntu-22-10/28578/4 "2024-06-14T06:25:04Z")

</div>

microk8s 1.29 and 1.30 is known to be broken on Debian and Ubuntu

> <https://github.com/canonical/microk8s/issues/4361>
>
> \#### Summary
> The last days I noticed that the installation of MicroK8s v1.29/st…able (6364) failed on a new (plain) Debian 12.4 system (tested on AWS EC2 with default Debian 12 image provided by AWS). After a few tests I can summarize the following behavior:
> 
> \- Installation of MicroK8s v1.28/stable (6089) on described Debian system via snap works like expected
> \[microk8s-1.28\_6089-inspection-report-20240110\_103728.tar.gz\](https://github.com/canonical/microk8s/files/13886670/microk8s-1.28\_6089-inspection-report-20240110\_103728.tar.gz)
> 
> \- Installation of MicroK8s v1.29/stable (6364) on described Debian system via snap failed and \`microk8s inspect\` responsed with: 
> \`\`\`
> admin@ip-172-31-16-112:~$ microk8s status
> microk8s is not running. Use microk8s inspect for a deeper inspection.
> admin@ip-172-31-16-112:~$ microk8s inspect
> Inspecting system
> Inspecting Certificates
> Inspecting services
> Service snap.microk8s.daemon-cluster-agent is running
> Service snap.microk8s.daemon-containerd is running
> Service snap.microk8s.daemon-kubelite is running
> Service snap.microk8s.daemon-k8s-dqlite is running
> Service snap.microk8s.daemon-apiserver-kicker is running
> Copy service arguments to the final report tarball
> Inspecting AppArmor configuration
> Gathering system information
> Copy processes list to the final report tarball
> Copy disk usage information to the final report tarball
> Copy memory usage information to the final report tarball
> Copy server uptime to the final report tarball
> Copy openSSL information to the final report tarball
> Copy snap list to the final report tarball
> Copy VM name (or none) to the final report tarball
> Copy current linux distribution to the final report tarball
> Copy asnycio usage and limits to the final report tarball
> Copy inotify max\_user\_instances and max\_user\_watches to the final report tarball
> Copy network configuration to the final report tarball
> Inspecting kubernetes cluster
> Inspect kubernetes cluster
> sudo: unable to resolve host ip-172-31-16-112: Name or service not known
> sudo: unable to resolve host ip-172-31-16-112: Name or service not known
> sudo: unable to resolve host ip-172-31-16-112: Name or service not known
> sudo: unable to resolve host ip-172-31-16-112: Name or service not known
> sudo: unable to resolve host ip-172-31-16-112: Name or service not known
> sudo: unable to resolve host ip-172-31-16-112: Name or service not known
> Inspecting dqlite
> Inspect dqlite
> cp: cannot stat '/var/snap/microk8s/6364/var/kubernetes/backend/localnode.yaml': No such file or directory
> 
> Building the report tarball
> Report tarball is at /var/snap/microk8s/6364/inspection-report-20240110\_102300.tar.gz
> \`\`\`
> \[microk8s\_1.29\_6364-inspection-report-20240110\_102300.tar.gz\](https://github.com/canonical/microk8s/files/13886662/microk8s\_1.29\_6364-inspection-report-20240110\_102300.tar.gz)
> 
> \- Refreshing the v1.28 (6089) instance to v1.29 (6364) works at the first glance, but the inspect looks not well:
> \`\`\`
> admin@ip-172-31-18-155:~$ microk8s kubectl get all -A
> NAMESPACE NAME READY STATUS RESTARTS AGE
> kube-system pod/coredns-864597b5fd-k7hvt 1/1 Running 0 2m29s
> kube-system pod/calico-kube-controllers-77bd7c5b-fp4zd 1/1 Running 0 2m29s
> 
> NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
> default service/kubernetes ClusterIP 10.152.183.1 \<none\> 443/TCP 2m35s
> kube-system service/kube-dns ClusterIP 10.152.183.10 \<none\> 53/UDP,53/TCP,9153/TCP 2m32s
> 
> NAMESPACE NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
> kube-system daemonset.apps/calico-node 1 1 1 1 1 kubernetes.io/os=linux 2m34s
> 
> NAMESPACE NAME READY UP-TO-DATE AVAILABLE AGE
> kube-system deployment.apps/coredns 1/1 1 1 2m32s
> kube-system deployment.apps/calico-kube-controllers 1/1 1 1 2m34s
> 
> NAMESPACE NAME DESIRED CURRENT READY AGE
> kube-system replicaset.apps/coredns-864597b5fd 1 1 1 2m29s
> kube-system replicaset.apps/calico-kube-controllers-77bd7c5b 1 1 1 2m29s
> 
> admin@ip-172-31-18-155:~$ microk8s inspect
> Inspecting system
> Inspecting Certificates
> Inspecting services
> Service snap.microk8s.daemon-cluster-agent is running
> Service snap.microk8s.daemon-containerd is running
> Service snap.microk8s.daemon-kubelite is running
> Service snap.microk8s.daemon-k8s-dqlite is running
> Service snap.microk8s.daemon-apiserver-kicker is running
> Copy service arguments to the final report tarball
> Inspecting AppArmor configuration
> Gathering system information
> Copy processes list to the final report tarball
> Copy disk usage information to the final report tarball
> Copy memory usage information to the final report tarball
> Copy server uptime to the final report tarball
> Copy openSSL information to the final report tarball
> Copy snap list to the final report tarball
> Copy VM name (or none) to the final report tarball
> Copy current linux distribution to the final report tarball
> Copy asnycio usage and limits to the final report tarball
> Copy inotify max\_user\_instances and max\_user\_watches to the final report tarball
> Copy network configuration to the final report tarball
> Inspecting kubernetes cluster
> Inspect kubernetes cluster
> sudo: unable to resolve host ip-172-31-18-155: Name or service not known
> sudo: unable to resolve host ip-172-31-18-155: Name or service not known
> sudo: unable to resolve host ip-172-31-18-155: Name or service not known
> sudo: unable to resolve host ip-172-31-18-155: Name or service not known
> sudo: unable to resolve host ip-172-31-18-155: Name or service not known
> sudo: unable to resolve host ip-172-31-18-155: Name or service not known
> Inspecting dqlite
> Inspect dqlite
> 
> Building the report tarball
> Report tarball is at /var/snap/microk8s/6364/inspection-report-20240110\_103926.tar.gz
> \`\`\`
> \[microk8s-1.28\_6089-refreshed-1.29\_6364-inspection-report-20240110\_103926.tar.gz\](https://github.com/canonical/microk8s/files/13887509/microk8s-1.28\_6089-refreshed-1.29\_6364-inspection-report-20240110\_103926.tar.gz)
> 
> \- The most strange thing is when I removed the MicroK8s package via \`sudo snap remove --purge microk8s\` and install the v1.29 (6364) again, the (one node) cluster seems to work like expected, but the inspect looks also not well:
> \`\`\`
> admin@ip-172-31-18-155:~$ microk8s kubectl get all -A
> NAMESPACE NAME READY STATUS RESTARTS AGE
> kube-system pod/calico-node-bggsw 1/1 Running 0 106s
> kube-system pod/coredns-864597b5fd-wzdz9 1/1 Running 0 105s
> kube-system pod/calico-kube-controllers-77bd7c5b-vlk94 1/1 Running 0 105s
> 
> NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
> default service/kubernetes ClusterIP 10.152.183.1 \<none\> 443/TCP 111s
> kube-system service/kube-dns ClusterIP 10.152.183.10 \<none\> 53/UDP,53/TCP,9153/TCP 109s
> 
> NAMESPACE NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
> kube-system daemonset.apps/calico-node 1 1 1 1 1 kubernetes.io/os=linux 111s
> 
> NAMESPACE NAME READY UP-TO-DATE AVAILABLE AGE
> kube-system deployment.apps/coredns 1/1 1 1 110s
> kube-system deployment.apps/calico-kube-controllers 1/1 1 1 111s
> 
> NAMESPACE NAME DESIRED CURRENT READY AGE
> kube-system replicaset.apps/coredns-864597b5fd 1 1 1 106s
> kube-system replicaset.apps/calico-kube-controllers-77bd7c5b 1 1 1 106s
> 
> admin@ip-172-31-18-155:~$ microk8s inspect
> Inspecting system
> Inspecting Certificates
> Inspecting services
> Service snap.microk8s.daemon-cluster-agent is running
> Service snap.microk8s.daemon-containerd is running
> Service snap.microk8s.daemon-kubelite is running
> Service snap.microk8s.daemon-k8s-dqlite is running
> Service snap.microk8s.daemon-apiserver-kicker is running
> Copy service arguments to the final report tarball
> Inspecting AppArmor configuration
> Gathering system information
> Copy processes list to the final report tarball
> Copy disk usage information to the final report tarball
> Copy memory usage information to the final report tarball
> Copy server uptime to the final report tarball
> Copy openSSL information to the final report tarball
> Copy snap list to the final report tarball
> Copy VM name (or none) to the final report tarball
> Copy current linux distribution to the final report tarball
> Copy asnycio usage and limits to the final report tarball
> Copy inotify max\_user\_instances and max\_user\_watches to the final report tarball
> Copy network configuration to the final report tarball
> Inspecting kubernetes cluster
> Inspect kubernetes cluster
> sudo: unable to resolve host ip-172-31-18-155: Name or service not known
> sudo: unable to resolve host ip-172-31-18-155: Name or service not known
> sudo: unable to resolve host ip-172-31-18-155: Name or service not known
> sudo: unable to resolve host ip-172-31-18-155: Name or service not known
> sudo: unable to resolve host ip-172-31-18-155: Name or service not known
> sudo: unable to resolve host ip-172-31-18-155: Name or service not known
> Inspecting dqlite
> Inspect dqlite
> cp: cannot stat '/var/snap/microk8s/6364/var/kubernetes/backend/localnode.yaml': No such file or directory
> 
> Building the report tarball
> Report tarball is at /var/snap/microk8s/6364/inspection-report-20240110\_104641.tar.gz
> \`\`\` 
> \[microk8s-reinstall-1.29\_6364-inspection-report-20240110\_104641.tar.gz.tar.gz\](https://github.com/canonical/microk8s/files/13887598/microk8s-reinstall-1.29\_6364-inspection-report-20240110\_104641.tar.gz.tar.gz)
> 
> 
> \#### What Should Happen Instead?
> I hope somebody of the development team can find the reason for this behavior. I guess there is something installed on the host system during the v1.28 installation what failed in v1.29, and is not removed during \`snap remove --purge\` process.
> 
> 
> \#### Reproduction Steps
> Explained above (incl. inspection tar balls)
> 
> 
> If there are any points left, I will try to answer your questions. 
> Thanks!

A fix is available in the edge channel

```auto

# switch to 1.30/edge channel if running 1.30
sudo snap refresh microk8s --channel 1.30/edge

# switch to 1.29/edge channel if running 1.29
sudo snap refresh microk8s --channel 1.29/edge

```

---

<div class="post-metadata">

**Author:** ![Szilard\_Istvan\_Szabo](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/szilard_istvan_szabo/32/15787_2.png) [@Szilard\_Istvan\_Szabo](https://discuss.kubernetes.io/u/Szilard_Istvan_Szabo)\
**Post date:** [September 16, 2024, 12:33am UTC](https://discuss.kubernetes.io/t/microk8s-installation-failing-on-ubuntu-22-10/28578/5 "2024-09-16T00:33:36Z")

</div>

Hi,  
try it:  
sudo microk8s stop  
sudo modprobe nf\_conntrack  
sudo microk8s start
