Skip to content

Commit

Permalink
Merge pull request #3897 from u5surf/issue-3878
Browse files Browse the repository at this point in the history
Replace server name in updateKubeConfig if --apiserver-name exists #3878
  • Loading branch information
tstromberg committed Mar 21, 2019
2 parents 6bf6290 + a34a9d3 commit 20b9cfd
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 @@ -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(),
Expand Down

0 comments on commit 20b9cfd

Please sign in to comment.