Skip to content

Commit

Permalink
Replace server name in updateKubeConfig if --apiserver-name exists #3878
Browse files Browse the repository at this point in the history
  • Loading branch information
u5surf committed Mar 18, 2019
1 parent 016e3f3 commit a34a9d3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,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(),
Expand Down

0 comments on commit a34a9d3

Please sign in to comment.