@@ -129,6 +129,9 @@ func disableClusterMonitoring(kubeBaseDir string) error {
129129 lines [i ] = "ENABLE_CLUSTER_MONITORING=false"
130130 } else if strings .Contains (line , "NUM_MINIONS=" ) {
131131 lines [i ] = "NUM_MINIONS=2"
132+ } else if strings .Contains (line , "MASTER_SIZE=" ) {
133+ // TODO(piosz): remove this once everything fits onto master
134+ lines [i ] = "MASTER_SIZE=n1-standard-2"
132135 }
133136 }
134137 output := strings .Join (lines , "\n " )
@@ -309,11 +312,19 @@ func downloadAndSetupCluster(version string) (baseDir string, err error) {
309312}
310313
311314func newKubeFramework (version string ) (kubeFramework , error ) {
315+ // Install gcloud components.
316+ // TODO(piosz): move this to the image creation
317+ cmd := exec .Command ("gcloud" , "components" , "install" , "alpha" , "beta" , "kubectl" , "--quiet" )
318+ glog .V (2 ).Infof ("about to install gcloud components" )
319+ if o , err := cmd .CombinedOutput (); err != nil {
320+ return nil , fmt .Errorf ("Error while installing gcloud components: %v\n %s" , err , o )
321+ }
322+
312323 var err error
313324 kubeBaseDir := ""
314325 if version != "" {
315326 if len (strings .Split (version , "." )) != 3 {
316- return nil , fmt . Errorf ( "invalid kubernetes version specified - %q" , version )
327+ glog . Warningf ( "Using not stable version - %q" , version )
317328 }
318329 kubeBaseDir , err = downloadAndSetupCluster (version )
319330 if err != nil {
0 commit comments