Skip to content

Commit

Permalink
Add more error messages during initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
liwenwu-amazon committed Sep 10, 2018
1 parent 9d05e90 commit 11fd113
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/k8sapi/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ func CreateKubeClient(apiserver string, kubeconfig string) (clientset.Interface,
log.Infof("Testing communication with server")
v, err := kubeClient.Discovery().ServerVersion()
if err != nil {
log.Infof("Failed to communicate with K8S Server. Please check instance security groups or http proxy setting")
fmt.Printf("Failed to communicate with K8S Server. Please check instance security groups or http proxy setting")
return nil, fmt.Errorf("error communicating with apiserver: %v", err)
}
log.Infof("Running with Kubernetes cluster version: v%s.%s. git version: %s. git tree state: %s. commit: %s. platform: %s",
Expand Down

0 comments on commit 11fd113

Please sign in to comment.