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:
1 parent
102f4ad4a4
commit
28ea18d3a6
1 file changed
-11
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user