Skip to content

Commit

Permalink
Merge pull request #174 from liwenwu-amazon/log-flush
Browse files Browse the repository at this point in the history
Add more error messages during initialization
  • Loading branch information
liwenwu-amazon authored Sep 11, 2018
2 parents 7332580 + 41fdef0 commit 4ee639c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/k8sapi/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ func CreateKubeClient(apiserver string, kubeconfig string) (clientset.Interface,
log.Infof("Testing communication with server")
v, err := kubeClient.Discovery().ServerVersion()
if err != nil {
errMsg := "Failed to communicate with K8S Server. Please check instance security groups or http proxy setting"
log.Infof(errMsg)
fmt.Printf(errMsg)
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 4ee639c

Please sign in to comment.