Setup the Kubernetes Dashboard

Setup the Kubernetes Dashboard and access the dashboard.

This how-to describes how Kubernetes Dashboard  can be enabled / used / deployed on c2d-ks1.


Enable dashboard

Important:

vagrant ssh c2d-ks1
sudo su -
microk8s.enable dns dashboard
kubectl -n kube-system patch svc kubernetes-dashboard -p '{"spec":{"externalIPs":["1.1.4.155"]}}'

To verify the dashboard is run command below. This curl should output Kubernetes Dashboard HTML.

curl https://1.1.4.155/ --insecure  # verify

Verify access through reverse proxy

Navigate to https://k8s.c2platform.org  and then login using bearer token. You can get the bear token using command:

kubectl -n kube-system describe secret microk8s-dashboard-token

Restart

There is a known issue that on restart of c2d-ks1 MicroK8s does not start and no longer works correctly:

root@c2d-ks1:~# microk8s start
missing profile snap.microk8s.microk8s.
Please make sure that the snapd.apparmor service is enabled and started

The workaround is execute:

apparmor_parser --add /var/lib/snapd/apparmor/profiles/snap.microk8s.*
microk8s restart


Last modified November 13, 2024: translate false C2-587 (af41e45)