kubernetesminikubek3d

Kubectl error : [memcache.go:265] couldn't get current server API group list


I'm new to Kubernetes and I'm trying to set up a local cluster using k3d. Here are the steps I've taken:

couldn't get current server API group list: Get "https://host.docker.internal:55345/api?timeout=32s": dial tcp 192.168.1.24:55345: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

I'm unsure how to resolve this issue. Can anyone help me understand what might be causing this error and how to fix it? Thank you in advance!


Solution

  • This happens usually because of dns or networking. The issue is with the host.docker.internal. you can change host.docker.internal to 127.0.0.1 in $HOME/.kube/config, you can reach it. Or by creating a new cluster like

    k3d cluster create mycluster --api-port localhost:5443