@@ -122,6 +122,7 @@ DNS_DOMAIN = ENV["DNS_DOMAIN"] || "cluster.local"
122122SERIAL_LOGGING = ( ENV [ "SERIAL_LOGGING" ] . to_s . downcase == "true" )
123123GUI = ( ENV [ "GUI" ] . to_s . downcase == "true" )
124124USE_KUBE_UI = ( ENV [ "USE_KUBE_UI" ] . to_s . downcase == "true" ) || false
125+ USE_METRICS_SERVER = ( ENV [ "USE_METRICS_SERVER" ] . to_s . downcase == "true" ) || false
125126
126127BOX_TIMEOUT_COUNT = ( ENV [ "BOX_TIMEOUT_COUNT" ] || 50 ) . to_i
127128
@@ -362,6 +363,18 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
362363
363364 info "Kubernetes Dashboard will be available at http://#{ MASTER_IP } :8080/ui/"
364365 end
366+
367+ if USE_METRICS_SERVER
368+ info "Configuring Kubernetes Metrics Server..."
369+
370+ if OS . windows?
371+ run_remote "/opt/bin/kubectl apply -f /home/core/metrics-server/"
372+ else
373+ system "kubectl apply -f plugins/metrics-server/"
374+ end
375+
376+ info "Kubernetes Metrics Server will be available at http://#{ MASTER_IP } :8080/apis/metrics.k8s.io/"
377+ end
365378 end
366379
367380 # copy setup files to master vm if host is windows
@@ -377,6 +390,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
377390 kHost . vm . provision :file , :source => File . join ( File . dirname ( __FILE__ ) , "plugins/dashboard/dashboard-rbac.yaml" ) , :destination => "/home/core/dashboard-rbac.yaml"
378391 kHost . vm . provision :file , :source => File . join ( File . dirname ( __FILE__ ) , "plugins/dashboard/dashboard.yaml" ) , :destination => "/home/core/dashboard.yaml"
379392 end
393+
394+ if USE_METRICS_SERVER
395+ kHost . vm . provision :file , :source => File . join ( File . dirname ( __FILE__ ) , "plugins/dashboard/metrics-server" ) , :destination => "/home/core/metrics-server"
396+ end
380397 end
381398
382399 # clean temp directory after master is destroyed
0 commit comments