From 0588764690a4419acc1f3f2f1324489133aa0918 Mon Sep 17 00:00:00 2001 From: Li Yi Date: Fri, 4 Jan 2019 23:03:53 +0800 Subject: [PATCH] Update Windows dashboard config file configuration --- README_en.md | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/README_en.md b/README_en.md index 36aaa3c..784ac1b 100644 --- a/README_en.md +++ b/README_en.md @@ -99,26 +99,21 @@ Access Kubernetes dashboard http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/overview?namespace=default -#### Config kubeconfig +#### Config kubeconfig (Or skip) ![resource](images/k8s_credentials.png) +For Mac + ```bash $ TOKEN=$(kubectl -n kube-system describe secret default| awk '$1=="token:"{print $2}') kubectl config set-credentials docker-for-desktop --token="${TOKEN}" ``` For Windows -First get value of dashboard-admin-token with below command: - -```cmd -kubectl describe secret -n kube-system dashboard-admin-token -``` - -copy this value and run below command to setup kubeconfig ```cmd -$TOKEN="YOUR_TOKEN_COPY_FROM_ABOVE" +$TOKEN=((kubectl -n kube-system describe secret default | Select-String "token:") -split " +")[1] kubectl config set-credentials docker-for-desktop --token="${TOKEN}" ```