2
rated 0 times
[
2]
[
0]
/ answers: 1 / hits: 544
/ 1 Year ago, sat, april 29, 2023, 4:10:00
I'm trying to get the token for the kubernetes dashboard. It seems none was generated. How do I force it to generate one? Here is what I did:
I've installed Ubuntu 20.04 on a hyperV VM on my local laptop. I used the ubuntu installer to install the microk8s snap.
I then installed dashboard among other things with this command:
microk8s enable dns dashboard storage
With a separate terminal I started a proxy:
microk8s kubectl port-forward -n kube-system service/kubernetes-dashboard 10443:443 --address 0.0.0.0
which of course asks for a token.
When trying to export the token with:
token=$(microk8s kubectl -n kube-system get secret | grep default-token | cut -d " " -f1)
microk8s kubectl -n kube-system describe secret $token
the resulting output shows no token:
Name: kubernetes-dashboard-certs
Namespace: kube-system
Labels: k8s-app=kubernetes-dashboard
Annotations: <none>
Type: Opaque
Data
====
Name: kubernetes-dashboard-csrf
Namespace: kube-system
Labels: k8s-app=kubernetes-dashboard
Annotations: <none>
Type: Opaque
Data
====
csrf: 256 bytes
Name: kubernetes-dashboard-key-holder
Namespace: kube-system
Labels: <none>
Annotations: <none>
Type: Opaque
Data
====
priv: 1675 bytes
pub: 459 bytes
More From » kubernetes