Error Getting Started with Juju & MicroK8s

I’ve been trying to get started by following the "Using Juju with MicroK8s instructions, but get stuck bootstrapping a juju controller:

https://juju.is/docs/microk8s-cloud

I follow all the instructions, but the juju bootstrap microk8s micro command inevitably returns this:

$ juju bootstrap microk8s micro
Creating Juju controller "micro" on microk8s/localhost
Fetching Juju Dashboard 0.3.0
Creating k8s resources for controller "controller-micro"
Starting controller pod
Bootstrap agent now started
Contacting Juju controller at 10.152.183.233 to verify accessibility...
ERROR unable to contact api server after 1 attempts: unable to connect to API: dial tcp 10.152.183.233:17070: connect: connection refused

Have completely wiped the install and tried again multiple times with the same results.

Looking at the mongodb log in /var/log/containers, it has these errors:

2020-11-17T13:59:04.624783383-08:00 stdout F 2020-11-17T21:59:04.624+0000 I CONTROL  [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2020-11-17T13:59:04.625982877-08:00 stdout F 2020-11-17T21:59:04.625+0000 E NETWORK  [main] cannot read certificate file: /var/lib/juju/server.pem error:02001002:system library:fopen:No such file or directory
2020-11-17T13:59:04.626097973-08:00 stdout F 2020-11-17T21:59:04.626+0000 F CONTROL  [main] Failed global initialization: InvalidSSLConfiguration: Can not set up PEM key file.

Not sure if it’s related or not?

Any ideas? This is an Ubuntu 20.10 desktop system.

I just tested this by starting a totally fresh 20.10 instance.

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.10
DISTRIB_CODENAME=groovy
DISTRIB_DESCRIPTION="Ubuntu 20.10"
$ sudo snap install microk8s --classic
$ sudo usermod -a -G microk8s $USER
logout and login
$ sudo snap install juju --classic
$ microk8s.enable dns storage
$ juju bootstrap microk8s test

The TLS 1.0 message is just a warning from mongodb that it is not using the insecure TLS 1.0 protocol.

Can you try bootstrapping with --debug… maybe there will be something helpful to indicate what’s wrong.