Microk8s: Snap installed fails with "connection to the server 127.0.0.1:16443 was refused"

Created on 2 Nov 2020  路  5Comments  路  Source: ubuntu/microk8s

I just tried to install microk8s on an Ubuntu 20.04 instance, and it failed as follows:

$ sudo snap install microk8s --classic
error: cannot perform the following tasks:
- Run configure hook of "microk8s" snap if present (run hook "configure":
-----
[...]
+ /snap/microk8s/1769/kubectl --kubeconfig=/var/snap/microk8s/1769/credentials/client.config apply -f /var/snap/microk8s/1769/args/cni-network/cni.yaml
The connection to the server 127.0.0.1:16443 was refused - did you specify the right host or port?
-----)

Unfortunately I can't run microk8s inspect as it's not installed yet :)

Most helpful comment

Hi @mthaddon

Could you try installing the latest/edge channel?

sudo snap install micro8s --classic --channel=latest/edge

All 5 comments

Hi @mthaddon

Could you try installing the latest/edge channel?

sudo snap install micro8s --classic --channel=latest/edge

That seemed to work, thanks.

This is still failing for me using the stable channel, so I don't think we should consider the issue resolved yet.

Reopening until available in 1.19/stable channel

@mthaddon the 1.19/stable has been updated with the fixes from latest/edge if u get the chance to try it. Thanks.

Was this page helpful?
0 / 5 - 0 ratings