1

May-2024 Docker Desktop v4.30.0

  • I installed Docker Desktop and enabled Kubernetes.
  • I have a config file generated in my .kube folder and it updates certificates when I click the "Reset Kubernetes Cluster" button.
  • I have wsl2 installed but not a distro (don't think I need one?)
  • In my hosts file I have have kubernetes.docker.internal pointing at localhost.
  • In my Docker Desktop (on Windows) I have 11 new images that the install of K8s seems to have put there. I have no running containers.

When I run: kubectl config get-contexts I get:

CURRENT   NAME             CLUSTER          AUTHINFO         NAMESPACE
*         docker-desktop   docker-desktop   docker-desktop

When I run: kubectl version I get the following:

Client Version: v1.29.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Unable to connect to the server: Not Found

So, I'm guessing I need to 'create' a master locally? But I don't see instructions for that on any of the Docker Desktop tutorials.

When I run: kubectl get node I get the following 5 times:

E0522 10:53:51.222489   27524 memcache.go:265] couldn't get current server API group list: Get "https://kubernetes.docker.internal:6443/api?timeout=32s": Not Found

Same with most other kubectl commands I try to run.

One last one, when I try (with a simple file) kubectl create -f pod1.yaml -o yaml I get:

error: error validating "pod1.yaml": error validating data: failed to download openapi: Get "https://kubernetes.docker.internal:6443/openapi/v2?timeout=32s": Not Found; if you choose to ignore these errors, turn validation off with --validate=false

What part of setup am I missing to run k8s locally?

1 Answer 1

0

This question has been answered here: https://stackoverflow.com/questions/78663883/kubectl-error-memcache-go265-couldnt-get-current-server-api-group-list

/.kube/config file needs to be updated thus:

#    server: https://kubernetes.docker.internal:6443
    server: https://127.0.0.1:6443

Working now.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .