Debian 11 Bullseye
Sponsored Link

MicroK8s : Enable Dashboard
To enable Dashboard on MicroK8s Cluster, Configure like follows.
[1] Enable Dashboard add-on on primary Node.
microk8s enable dashboard dns

Enabling Kubernetes Dashboard
Enabling Metrics-Server created created created


In an RBAC enabled setup (microk8s enable RBAC) you need to create a user with restricted
permissions as shown in:

Enabling DNS
Applying manifest
serviceaccount/coredns created
configmap/coredns created
deployment.apps/coredns created
service/kube-dns created created created
Restarting kubelet
Adding argument --cluster-domain to nodes.
Adding argument --cluster-domain to nodes.
Adding argument --cluster-dns to nodes.
Adding argument --cluster-dns to nodes.
Restarting nodes.
Restarting nodes.
DNS is enabled

microk8s kubectl get services -n kube-system

NAME                        TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                  AGE
metrics-server              ClusterIP    <none>        443/TCP                  59s
kubernetes-dashboard        ClusterIP    <none>        443/TCP                  48s
dashboard-metrics-scraper   ClusterIP   <none>        8000/TCP                 48s
kube-dns                    ClusterIP    <none>        53/UDP,53/TCP,9153/TCP   47s

# confirm security token
# it is the second column value on [token:] line

microk8s kubectl -n kube-system describe secret $(microk8s kubectl -n kube-system get secret | grep default-token | awk '{print $1}')

Name:         default-token-nbfzr
Namespace:    kube-system
Labels:       <none>
Annotations: default


namespace:  11 bytes
token:      eyJhbGciOiJSUzI1NiIsImtpZCI6Ik5LT05xcUhJckpkRnpXcWNiWDk0STBzNnQyY2J3.....
ca.crt:     1123 bytes

# set port-forwarding to enable external access

microk8s kubectl port-forward -n kube-system service/kubernetes-dashboard --address 10443:443

Forwarding from -> 8443
[2] Access to [https://(MicroK8s primary node's Hostname or IP address):10443/] with an web browser on any Client computer in local network. Copy and paste the security token you confirmed on [1] to [Enter token] section and Click [Sing In] button.
[3] After successfully authenticated, MicroK8s Cluster Dashboard is displayed.
Matched Content