Skip to content

Commit

Permalink
Replace 127.0.0.1 with Public IP address
Browse files Browse the repository at this point in the history
Replaces 127.0.0.1 in addition to localhost
in KUBECONFIG to support k3s 0.9.0

Signed-off-by: Greg Osuri <[email protected]>
  • Loading branch information
gosuri authored and alexellis committed Oct 8, 2019
1 parent 7d95441 commit 9694a6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cmd/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func MakeInstall() *cobra.Command {

absPath, _ := filepath.Abs(localKubeconfig)

kubeconfig := []byte(strings.Replace(string(res.StdOut), "localhost", ip.String(), -1))
kubeconfig := []byte(strings.NewReplacer("localhost", ip.String(), "127.0.0.1", ip.String()).Replace(string(res.StdOut)))

if merge {
// Create a merged kubeconfig
Expand Down

0 comments on commit 9694a6f

Please sign in to comment.