I’m currently facing an issue with my Kubernetes clusters and need some assistance. Everything was running smoothly until today. However, after performing an update on my Ubuntu system, I’m unable to establish a connection from my working environment to the kubernetes clusters.
When executing the command kubectl get pods
, I’m encountering the following error message:
E0805 09:59:45.750534 234576 memcache.go:265] couldn’t get current server API group list: Get "http://localhost:3334/api?timeout=32s": EOF
Here are the details of my cluster setup: Kubernetes 1.27, bare-metal, Host System is Ubuntu 20.04
I would greatly appreciate any guidance or insights on resolving this issue.
2
Answers
Try kubectl get nodes -v=10 and look for the errors.
It’s authentication issue – to API
ensure kubeconfig exists and correct from which user command is executed.
This usually observed during bootstrap a cluster and forget to run below
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config