Cannot connect to Microk8s API address

Hi!

When I try to connect to a juju controller deployed on microk8s, I get an error saying cannot connect to k8s api server; try running 'juju update-k8s --client <k8s cloud name>'

I also added this cloud to a controller bootstrapped in lxd and when I try to add a new model using the cloud I get similar error.

I guess it is as easy as to just run juju update-k8s --client <k8s cloud name> but how often does this API address change and can I set a static IP? or does the error refer to something else?

EDIT: After running juju update-k8s --client <k8s cloud name> I was able to connect to the controller bootstrapped in microk8s, but not able to add a new model from the controller in lxd where microk8s is added as a cloud.

1 Like