Merge pull request #1738 from aaron-prindle/storage-port

Fix storage provisioner to use insecure address port
pull/1759/head
Aaron Prindle 2017-07-26 11:08:06 -07:00 committed by GitHub
commit 4fd5f4797b
1 changed files with 3 additions and 1 deletions

View File

@ -19,8 +19,10 @@ package localkube
import (
"errors"
"fmt"
"net"
"os"
"path"
"strconv"
"time"
"github.com/golang/glog"
@ -123,7 +125,7 @@ func StartStorageProvisioner(lk LocalkubeServer) func() error {
// Create an InClusterConfig and use it to create a client for the controller
// to use to communicate with Kubernetes
config := rest.Config{Host: "http://localhost:8080"}
config := rest.Config{Host: net.JoinHostPort("localhost", strconv.Itoa(lk.APIServerInsecurePort))}
return func() error {
clientset, err := kubernetes.NewForConfig(&config)