microk8sjuju

Microk8s Error When Trying to Install Kubeflow


I'm blindly following the installation documentation to get Microk8s installed and configured with kubeflow, but I'm hitting an error like this below:

https://charmed-kubeflow.io/docs/quickstart

joesan@joesan-InfinityBook-S-14-v5:~$ juju add-model kubeflow
ERROR opening API connection: starting proxy for api connection: connecting k8s proxy: Get "https://192.168.0.35:16443/api/v1/namespaces/controller-microk8s-localhost/services/controller-service": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "10.152.183.1")

Looks like some certificate is not matching up, but how do I resolve this?

EDIT: I tried to remove the controller, but to no success:

joesan@joesan-InfinityBook-S-14-v5:~$ juju kill-controller microk8s-localhost
WARNING! This command will destroy the "microk8s-localhost" controller.
This includes all machines, applications, data and other resources.

Continue? (y/N):y
Unable to open API: starting proxy for api connection: connecting k8s proxy: Get "https://192.168.0.35:16443/api/v1/namespaces/controller-microk8s-localhost/services/controller-service": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "10.152.183.1")
ERROR getting controller environ: getting environ using bootstrap config from client store: finding controller namespace with non legacy labels: Get "https://192.168.0.35:16443/api/v1/namespaces?labelSelector=model.juju.is%2Fname%3Dcontroller": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "10.152.183.1")

I'm on Ubuntu 20.04 LTS machine.


Solution

  • Removing

    ~$ .local/share/juju
    

    did the trick for me. There were some stale credentials lying around from a previous installation I guess.