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).
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 -
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