How to access GKE kubectl proxy dashboard?

6/7/2018

I would imagine the interface would have some button I could click to launch the kubectl proxy dashboard, but I could not find it.

I tried this command to get the token and entered it in:

gcloud container clusters get-credentials mycluster

kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | awk '/^deployment-controller-token-/{print $1}') | awk '$1=="token:"{print $2}'

kubectl proxy

And it shows some things, but not others (services are missing, says it's forbidden).

How do I use kubectl proxy or show that dashboard with GKE?

-- atkayla
google-cloud-platform
google-kubernetes-engine
kubernetes

3 Answers

1/18/2019

Provided you are authenticated with gcloud auth login and the current project and k8s cluster is configured to the one you need, authenticate kubectl to the cluster (this will write ~/.kube/config):

gcloud container clusters get-credentials <cluster name> --zone <zone> --project <project>

retrieve the auth token that the kubectl itself uses to authenticate as you

gcloud config config-helper --format=json | jq -r '.credential.access_token'

run

kubectl proxy

Then open a local machine web browser on

http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy (This will only work if you checked the checkbox Deploy Dashboard in GCP console)

and use the token from the second command to log in with your Google Account's permissions.

-- Alexander
Source: StackOverflow

6/15/2018

The Dashboard is disabled and deprecated in GKE as of September 2017. GKE provides a built in dashboard through the Management Console GUI.

-- Patrick W
Source: StackOverflow

11/25/2019

You can disable it from the Google Cloud Console (UI).

  1. Edit your cluster
  2. Go to "Add-ons" section
  3. Find "Kubernetes dashboard"
  4. Chose "disabled" from dropdown
  5. Save it.

Also according to the documentation this thing will be removed starting GKE 1.15

Warning: The open source Kubernetes Dashboard addon is deprecated for clusters on GKE and will be removed as an option in version 1.15. It is recommended to use the alternative GCP Console dashboards described on this page.

-- LEQADA
Source: StackOverflow