loft-sh / vcluster-dd-extension

This provides an extension integration with Docker Desktop to allow managing vclusters quickly and easily through the Docker Desktop interface.
5 stars 0 forks source link

A heads up -- possible changes may have broken this for new installations of Docker Desktop #35

Open spurin opened 11 months ago

spurin commented 11 months ago

Hi All,

As you may be aware, I previously re-used the go version of your code for capturing and working with the kubeconfig file from the Docker Desktop instance.

Recent changes in Docker Desktop, no longer add an entry to /etc/hosts -

# Added by Docker Desktop
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal

This entry, would become the serverName in the kubeconfig file and subsequently, it would allow kubectl to work when it was run from both the desktop and a container.

The entry is no longer added and the kubeconfig file now references the server as https://127.0.0.1:6443 -- which, works fine on Docker Desktop but not, whilst running in a container (i.e. the extension).

The workaround I've used for your Go code is quite simple, I just change https://127.0.0.1:6443 to https://kubernetes.docker.internal:6443 after it's copied the file.

You may want to check your extension on a fresh install of Docker without any previous host file entries.

Best of luck and thanks again

FabianKramm commented 11 months ago

@spurin thanks for the issue! We will check that!