Merge pull request #3897 from u5surf/issue-3878
Replace server name in updateKubeConfig if --apiserver-name exists #3878pull/3839/head^2
commit
20b9cfd0f3
|
@ -458,6 +458,9 @@ func updateKubeConfig(h *host.Host, c *cfg.Config) *kubeconfig.KubeConfigSetup {
|
|||
}
|
||||
addr = strings.Replace(addr, "tcp://", "https://", -1)
|
||||
addr = strings.Replace(addr, ":2376", ":"+strconv.Itoa(c.KubernetesConfig.NodePort), -1)
|
||||
if c.KubernetesConfig.APIServerName != constants.APIServerName {
|
||||
addr = strings.Replace(addr, c.KubernetesConfig.NodeIP, c.KubernetesConfig.APIServerName, -1)
|
||||
}
|
||||
|
||||
kcs := &kubeconfig.KubeConfigSetup{
|
||||
ClusterName: cfg.GetMachineName(),
|
||||
|
|
Loading…
Reference in New Issue