From 29446cfa88f226788975a7a0032ed1de738750b9 Mon Sep 17 00:00:00 2001 From: Sumit Ghosh <13281246+sughosneo@users.noreply.github.com> Date: Tue, 24 Nov 2020 17:13:27 +0530 Subject: [PATCH] Updated k8s dashboard token fetch command. --- Deploy-to-Local-Kubernetes.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Deploy-to-Local-Kubernetes.md b/Deploy-to-Local-Kubernetes.md index d141626..11d4249 100644 --- a/Deploy-to-Local-Kubernetes.md +++ b/Deploy-to-Local-Kubernetes.md @@ -403,8 +403,15 @@ To enable the dashboard: 5. Get the bearer token to login to the dashboard by running this command: + In PowerShell : + ```powershell - kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}') + kubectl -n kubernetes-dashboard describe secret $(((kubectl -n kubernetes-dashboard get secret | Select-String 'admin-user') -split " ")[0]) + ``` + Or in other Shell : + + ```bash + kubectl -n kubernetes-dashboard describe secret $(kubectl -n kubernetes-dashboard get secret | grep admin-user | awk '{print $1}') ``` You should get something like this: