<p>I've created a Google Kubernetes Engine Cluster through the Cloud Console. Now I want to connect to it using <code>kubectl</code> from my local machine.
A few weeks ago I used</p>

<pre><code>gcloud container clusters get-credentials cents-ideas --zone europe-west3-a --project cents-ideas
</code></pre>

<p>as provided by the Cloud Console.</p>

<p>The output after running this command is:</p>

<pre><code>Fetching cluster endpoint and auth data.
kubeconfig entry generated for cents-ideas.
</code></pre>

<p>But the cluster is neither in <code>kubectl config get-contexts</code> nor set as <code>kubectl config current-context</code>. I am confused because this command used to work and did nothing different.</p>

<p><a href="https://i.stack.imgur.com/NrMuG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NrMuG.png" alt="c"></a></p>

<hr>

<p>My <code>kubectl version</code>:</p>

<pre><code>Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.2", GitCommit:"59603c6e503c87169aea6106f57b9f242f64df89", GitTreeState:"clean", BuildDate:"2020-01-18T23:30:10Z", GoVersion:"go1.13.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.2", GitCommit:"59603c6e503c87169aea6106f57b9f242f64df89", GitTreeState:"clean", BuildDate:"2020-01-18T23:22:30Z", GoVersion:"go1.13.5", Compiler:"gc", Platform:"linux/amd64"}
</code></pre>

<p>and <code>gcloud version</code></p>

<pre><code>Google Cloud SDK 278.0.0
alpha 2020.01.24
beta 2020.01.24
bq 2.0.52
core 2020.01.24
gsutil 4.47
kubectl 2020.01.24
</code></pre>

<p><code>cat ~/.kube/config</code></p>

<pre><code>apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: &lt;LONG HASH&gt;
    server: https://35.234.108.15
  name: gke_cents-ideas_europe-west3-a_cents-ideas
contexts:
- context:
    cluster: gke_cents-ideas_europe-west3-a_cents-ideas
    user: gke_cents-ideas_europe-west3-a_cents-ideas
  name: gke_cents-ideas_europe-west3-a_cents-ideas
current-context: gke_cents-ideas_europe-west3-a_cents-ideas
kind: Config
preferences: {}
users:
- name: gke_cents-ideas_europe-west3-a_cents-ideas
  user:
    auth-provider:
      config:
        access-token: &lt;SOME TOKEN&gt;
        cmd-args: config config-helper --format=json
        cmd-path: /snap/google-cloud-sdk/115/bin/gcloud
        expiry: "2020-02-02T09:45:19Z"
        expiry-key: '{.credential.token_expiry}'
        token-key: '{.credential.access_token}'
      name: gcp

</code></pre>

<p>Output of <code>kubectl get nodes</code></p>

<pre><code>NAME         STATUS   ROLES    AGE   VERSION
flolubuntu   Ready    &lt;none&gt;   42d   v1.17.2
</code></pre>

Florian Ludewig
<p>I had <code>microk8s</code> installed. Removing it and instead installing <code>snap install kubectl</code> fixed my issue.</p>
