<p>Generally you can use <code>kops get secrets kube --type secret -oplaintext</code>, but I am not running on AWS and am using GCP. </p>

<p>I read that <code>kubectl config view</code> should show you this info, but I see no such thing (wondering if this has to do with GCP serviceaccount setup, am also using GKE).</p>

<p>The <code>kubectl config view</code> returns something like:</p>

<pre><code>apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: REDACTED
    server: https://MY_IP
  name: MY_CLUSTER_NAME
contexts:
- context:
    cluster: MY_CLUSTER_NAME
    user: MY_CLUSTER_NAME
  name: MY_CLUSTER_NAME
current-context: MY_CONTEXT_NAME
kind: Config
preferences: {}
users:
- name: MY_CLUSTER_NAME
  user:
    auth-provider:
      config:
        access-token: MY_ACCESS_TOKEN
        cmd-args: config config-helper --format=json
        cmd-path: /usr/lib/google-cloud-sdk/bin/gcloud
        expiry: 2019-02-27T03:20:49Z
        expiry-key: '{.credential.token_expiry}'
        token-key: '{.credential.access_token}'
      name: gcp
</code></pre>

<p>Neither <strong>Username</strong>=><code>Admin</code> or <strong>Username</strong>=><code>MY_CLUSTER_NAME</code> worked with <strong>Password</strong>=><code>MY_ACCESS_TOKEN</code></p>

<p>Any ideas?</p>

Alexander Kleinhans
<p>Try:</p>

<pre class="lang-sh prettyprint-override"><code>gcloud container clusters describe ${CLUSTER} \
--flatten="masterAuth"
[--zone=${ZONE}|--region=${REGION} \
--project=${PROJECT}
</code></pre>

<p>It's possible that your cluster has basic authentication (username|password) <em>disabled</em> as this authentication mechanism is discouraged.</p>

<p>An alternative mechanism provided with Kubernetes Engine is (as shown in your config) is to use your <code>gcloud</code> credentials to get you onto the cluster.</p>

<p>The following command will configure <code>~/.kube/config</code> so that you may access the cluster using your <code>gcloud</code> credentials. It looks as though this step has been done and you can use <code>kubectl</code> directly.</p>

<pre><code>gcloud container clusters get-credentials ${CLUSTER} \
[--zone=${ZONE}|--region=${REGION}] \
--project=${PROJECT}
</code></pre>

<p>As long as you're logged in using <code>gcloud</code> with an account that's permitted to use the cluster, you should be able to:</p>

<pre><code>kubectl cluster-info
kubectl get nodes
</code></pre>
