kubernetes dashboard

token

kubectl -n kubernetes-dashboard create token admin-user –duration=0
eyJhbGciOiJSUzI1NiIsImtpZCI6IjA3UXBrR1JYRDdGaHNMZ0pNZHl5UkJ0QmNGeXBVOVlfUHhOS09wTkpQQzQifQ.eyJhdWQiOlsiaHR0cHM6Ly9rdWJlcm5ldGVzLmRlZmF1bHQuc3ZjLmNsdXN0ZXIubG9jYWwiXSwiZXhwIjoxNjY3Mjk5MDE1LCJpYXQiOjE2NjcyOTU0MTUsImlzcyI6Imh0dHBzOi8va3ViZXJuZXRlcy5kZWZhdWx0LnN2Yy5jbHVzdGVyLmxvY2FsIiwia3ViZXJuZXRlcy5pbyI6eyJuYW1lc3BhY2UiOiJrdWJlcm5ldGVzLWRhc2hib2FyZCIsInNlcnZpY2VhY2NvdW50Ijp7Im5hbWUiOiJhZG1pbi11c2VyIiwidWlkIjoiM2U4OTQzNTUtMzFjNi00M2VlLTg5YTAtZTQxMzM2NWViMzMyIn19LCJuYmYiOjE2NjcyOTU0MTUsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDprdWJlcm5ldGVzLWRhc2hib2FyZDphZG1pbi11c2VyIn0.rtra01E-O1CzZpBi1ocoGIETSHAWHgAq77OdZIsiMXhCKyv9bXHKCbqR-4AfGaXzEo_8W0GbHcMa_43BzVQXsrb15jIxTmEK6VgEKHD5a5KUesBd6DxEtx1pzcwgGptyb7uQY0kE_dycI7RAN8khujiFIIg2tZYCg7Vt0Um0ewD6pMy25vwRRj65uc0ROy8Q4fkq-FDnSJAerY5bPQmMC2OSFMmMyU117ZDhRAyHMv53LEy9S2t8iR2tEjBxKjB4lNo_KBjI1jx0EfTn5tIGM6yG15jIMoe3nnxyshN7kH1Fy3ITqpMU1QBWGQyiDRryEp8DuKbEMzDTGFawmE2V_Q

k -n kubernetes-dashboard get sa
NAME SECRETS AGE
admin-user 0 35d
default 0 35d
kubernetes-dashboard 0 35d

k -n kubernetes-dashboard describe sa admin-user
Name: admin-user
Namespace: kubernetes-dashboard
Labels:
Annotations:
Image pull secrets:
Mountable secrets:
Tokens:
Events:

k -n kubernetes-dashboard get secrets
NAME TYPE DATA AGE
kubernetes-dashboard-certs Opaque 5 35d
kubernetes-dashboard-csrf Opaque 1 35d
kubernetes-dashboard-key-holder Opaque 2 35d

dashboard

https://github.com/kubernetes/dashboard
https://levelup.gitconnected.com/step-by-step-slow-guide-kubernetes-dashboard-on-raspberry-pi-cluster-part-2-acdc8f9b5b99

wget https://raw.githubusercontent.com/kubernetes/dashboard/v2.2.0/aio/deploy/recommended.yaml
wget https://raw.githubusercontent.com/kubernetes/dashboard/v2.6.1/aio/deploy/recommended.yaml

v2.7.0
k delete namespace kubernetes-dashboard
k apply -f ns.yaml

# k -n kubernetes-dashboard delete secret kubernetes-dashboard-certs
phomlish@a6:~/kubernetes/dashboard$ ls -l certs
total 32
-rw-r–r– 1 phomlish homeuser 2581 Sep 21 05:53 homlish_ca.cert.pem
-rw-r–r– 1 phomlish homeuser 7583 Sep 27 03:07 kubernetes.homlish.net.2022-09-27.cert.pem
-rw-r—– 1 phomlish homeuser 3272 Sep 27 03:07 kubernetes.homlish.net.2022-09-27.key.pem
drwxr-xr-x 2 phomlish homeuser 4096 Sep 21 05:53 old
-rw-r–r– 1 phomlish homeuser 7583 Sep 27 03:08 tls.crt
-rw-r—– 1 phomlish homeuser 3272 Sep 27 03:07 tls.key
k -n kubernetes-dashboard create secret generic kubernetes-dashboard-certs –from-file=certs
k -n kubernetes-dashboard get secret kubernetes-dashboard-certs -o yaml

k apply -f homlish.yaml
k apply -f sa.yaml
k apply -f roles.yaml
k apply -f lb.yaml
kubectl -n kubernetes-dashboard create token admin-user –duration=744h
k –namespace kubernetes-dashboard get all

Get token:
https://github.com/kubernetes/dashboard/blob/v2.0.0/docs/user/access-control/creating-sample-user.md

phomlish@a6:~/kubernetes/dashboard$ kubectl -n kubernetes-dashboard create token admin-user –duration=744h
eyJhbGciOiJSUzI1NiIsImtpZCI6IjA3UXBrR1JYRDdGaHNMZ0pNZHl5UkJ0QmNGeXBVOVlfUHhOS09wTkpQQzQifQ.eyJhdWQiOlsiaHR0cHM6Ly9rdWJlcm5ldGVzLmRlZmF1bHQuc3ZjLmNsdXN0ZXIubG9jYWwiXSwiZXhwIjoxNjY3MTE3MzkyLCJpYXQiOjE2NjQ0Mzg5OTIsImlzcyI6Imh0dHBzOi8va3ViZXJuZXRlcy5kZWZhdWx0LnN2Yy5jbHVzdGVyLmxvY2FsIiwia3ViZXJuZXRlcy5pbyI6eyJuYW1lc3BhY2UiOiJrdWJlcm5ldGVzLWRhc2hib2FyZCIsInNlcnZpY2VhY2NvdW50Ijp7Im5hbWUiOiJhZG1pbi11c2VyIiwidWlkIjoiM2U4OTQzNTUtMzFjNi00M2VlLTg5YTAtZTQxMzM2NWViMzMyIn19LCJuYmYiOjE2NjQ0Mzg5OTIsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDprdWJlcm5ldGVzLWRhc2hib2FyZDphZG1pbi11c2VyIn0.u9J8yj0oX_nnSHEeOGM7IFiMfcMxOBGAt3zgl8VkWt0maS0mT4HoDX-TNYOZjsYYGcLf18u4olXojt1KDIrmY4fksXTeF66MocrmVhnqhTxSzW1VxRlEhOJw2bLqI-iBJJNA2t3WU164PDlAVh9WvhWbTrUV1S_honhKlFD9uVTOJzGH_V8NimiRiwU_2UJslj34jPrZRHiuq3pWo2maUC0MSTjkVzJ42rAWzQs0hqnSqcdZFgQIR53WKBEW7ZN2zQGzB-Dt4SGg9cYZnx63YpHzHnLZIIFPR-HfOZ3nPUGxfUS_EsazTz6AYv7mMwVmOxllzz6PPYaeCWbONDslzQ

a6:/kubernetes/dashboard
./getToken.sh

visit:
k proxy

https://kubernetes.homlish.net/#/pod?namespace=default

isn’t working
k -n kubernetes-dashboard describe deployment.apps/kubernetes-dashboard
can’t exec into pod

Leave a Reply

Your email address will not be published. Required fields are marked *