mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Handle a missing apiserver flag better.
This commit is contained in:
parent
121a291a0c
commit
1a5a7ebd69
@ -17,6 +17,7 @@ limitations under the License.
|
||||
package kubelet
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/exec"
|
||||
@ -160,6 +161,9 @@ func getApiserverClient(authPath string, apiServerList util.StringList) (*client
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(apiServerList) < 1 {
|
||||
return nil, fmt.Errorf("no apiservers specified.")
|
||||
}
|
||||
// TODO: adapt Kube client to support LB over several servers
|
||||
if len(apiServerList) > 1 {
|
||||
glog.Infof("Mulitple api servers specified. Picking first one")
|
||||
|
Loading…
Reference in New Issue
Block a user