microk8s Broken K8s Dashboard and Kubeflow Dashboard microk8s Broken K8s Dashboard and Kubeflow Dashboard kubernetes kubernetes

microk8s Broken K8s Dashboard and Kubeflow Dashboard


I am running MicroK8s 1.18.2 + Kubeflow on Ubuntu 18.04.3 LTS natively (not in a VM environment) and had the same issue. Luckily I was able to solve the issue and would like to share my solution with you. It turned out that my laptop was not able to resolve the URL to the dashboard (10.64.140.43.xip.io), so I added this address into the hosts file.

My installation routine:

> # Install MicroK8s> $ sudo snap install microk8s --classic --channel=1.18/stable  > # Set IP forwarding> $ sudo apt-get update -qq  > $ sudo apt-get install -qq -y iptables-persistent  > $ sudo iptables -P FORWARD ACCEPT> # Add xip.io adress to hosts   > $ sudo -- sh -c "echo '10.64.140.43\t10.64.140.43.xip.io' >>> /etc/hosts"> # Check if MicroK8s is Running> $ microk8s status --wait-ready | grep microk8s  > $ microk8s kubectl get nodes> $ microk8s kubectl get services> # Set kubectl alias for MicroK8s > $ sudo snap alias microk8s.kubectl kubectl > # Activate MicroK8s Add-ons (DNS, Storage, K8s-Dashboard)> $ microk8s.enable dns storage dashboard> # (OPTIONAL) Activate GPU Devices for Nvidia GPUs> $ microk8s.enable gpu > # Activate Kubeflow > $ microk8s.enable kubeflow    > # Check if MicroK8s Add-ons are Running > $ microk8s status --wait-ready

Depending on your hardware and internet connection, it might take some time until all services are ready. If all services are up, simply open http://10.64.140.43.xip.io in your browser and enter the user (admin) and your generated password.

I hope this works for you as well. :)


So I had the same issue and spent some time on it but found how to do it thanks to the code there https://github.com/ubuntu/microk8s/blob/master/microk8s-resources/actions/enable.kubeflow.sh

After the enable kubeflow, the kubeflow dashboard is available at http://10.64.140.43.xip.io/, but this is a private IP, unreachable outside of your local network of your VM. You cant' fix that with a proxy (I tried) because some URL are absolute (with the domain name).

Let's say your VM is reachable from outside at public IP A.B.C.D. You need to change the kubeflow hostname to A.B.C.D.xip.io

So basically you need to change the hostname in several juju apps:

sudo microk8s juju config dex-auth public-url=http://A.B.C.D.xip.iosudo microk8s juju config oidc-gatekeeper public-url=http://A.B.C.D.xip.iosudo microk8s juju config ambassador juju-external-hostname=A.B.C.D.xip.io

I hope this helps,