nocalhost / nocalhost

Nocalhost is Cloud Native Dev Environment.
https://nocalhost.dev
Other
1.79k stars 158 forks source link

[Bug] `Cluster` does not work in kind when using `Nocalhost Server` #1317

Closed yuyicai closed 2 years ago

yuyicai commented 2 years ago

What happened:
Cluster does not work in kind when using Nocalhost Server, because the api server address of kind kubeconfig is 127.0.0.1

Anything else we need to know?: We can change the api server address to https://kubernetes.default.svc when we add the cluster.
However, we cannot connect to the cluster from the nocalhost plugin because nhctl cannot connect to https://kubernetes.default.svc.

We can add a parameter extra_api_server.
When we get the kubeconfig from DevSpace, if extra_api_server exists, then replace the api server with extra_api_server

Environment:

yuyicai commented 2 years ago

cc @anurnomeru @lyzhang1999 @xinxinh2020 @wencaiwulue

anurnomeru commented 2 years ago

This is very friendly for users using local clusters such as KIND