Remove localhost:8080 fallback for Kubernetes api-server

It was a hack for a badly-configured Kubernetes install: it shouldn't
be necessary, it will only work on an unsecured install, and it
generates confusing error messages when something is really wrong.
This commit is contained in:
Bryan Boreham committed 2017-07-19 22:59:34 +00:00
1 parent 102f4ad4a4
commit 28ea18d3a6
1 file changed
-11
-11
View File
@@ -20,17 +20,6 @@ func getKubePeers() ([]string, error) {
return nil, err
}
nodeList, err := c.Nodes().List(api.ListOptions{})
if err != nil {
// Fallback for cases (e.g. from kube-up.sh) where kube-proxy is not running on master
config.Host = "http://localhost:8080"
log.Print("error contacting APIServer: ", err, "; trying with fallback: ", config.Host)
c, err = kubernetes.NewForConfig(config)
if err != nil {
return nil, err
}
nodeList, err = c.Nodes().List(api.ListOptions{})
}
if err != nil {
return nil, err
}