Kubectl error couldn't get current server API group list

Good afternoon everybody!

I am in need of assistance with my kubernetes clusters.

Everything was fine yesterday, but today after I updated my ubuntu I can’t get to connect to my working space to my clusters.

Whenever I try to get the ‘kubectl get pods’, it appears the following message:

E0706 15:32:33.989368 635117 memcache.go:265] couldn’t get current server API group list: Get “https://0.0.0.0:33341/api?timeout=32s”: EOF

Any advice in how to solve this issue?

Cluster information:

Kubernetes version: 1.27
Cloud being used: (put bare-metal if not on a public cloud) bare-metal
Host OS: Ubuntu 20.04

Hi,
use same credentials, like what ever credentials you’re used provisioning the cluster using the terraform
same credentials use where ever you installed kubectl. Same issue i was faced and resolved today.
Thank you

Hello ramsiva_k!

Thanks in advance for your reply.

Sorry, but I couldn’t understand what you mean by credentials… Can you be more specific?

I’ve seen that if I completely purge my installation of the docker, kubectl and reinstall it will start working again. But I can’t lose meu deployments

Hi, what type of Kubernetes cluster have you installed? k3s?

I get the same error with minikube

Yes, I am using k3s to manage the cluster.

However, I manage to work around the problem by completely removing the kubernetes and all it’s packages.

I had to do all the work again…A few nights without sleep…hehe

But thank you all for your trouble.

One suggestion for the future, use the verbose flag to get the real details of the error

Theres a lot more info there that you can use to troubleshoot.

1 Like

I just ran into this issue and discovered that my k8s certificate expired.
yq -r '.users[0].user."client-certificate-data"' <.kube/config | base64 -d | openssl x509 -text
[0] being the first user in your kube config file.

Hello Duke!

Thanks for the reply, I should have looked for it…