aboutsummaryrefslogtreecommitdiffstats
path: root/vagrant
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2018-10-04 01:53:45 -0700
committerVictor Morales <victor.morales@intel.com>2018-10-04 01:55:34 -0700
commit2cae592aefec883743bd2df7b58127883c8eff45 (patch)
treeee4bc6da84ca083892a2f162fe0850bbadc6bffd /vagrant
parent373ab2024543a1d3c0d025715e80c3755995d6b5 (diff)
Set 30080 port for Kubernetes Dashboard
This change allows to use a specific port for the Kubernetes Dashboard which avoids to discover it later. Change-Id: Ia2ae07678ec9b96d4644c6d2dc926527359b101f Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-ID: MULTICLOUD-301
Diffstat (limited to 'vagrant')
-rwxr-xr-xvagrant/installer.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/vagrant/installer.sh b/vagrant/installer.sh
index dd5b77b6..f3f11a77 100755
--- a/vagrant/installer.sh
+++ b/vagrant/installer.sh
@@ -195,10 +195,11 @@ function _print_kubernetes_info {
return
fi
# Expose Dashboard using NodePort
+ node_port=30080
KUBE_EDITOR="sed -i \"s|type\: ClusterIP|type\: NodePort|g\"" kubectl -n kube-system edit service kubernetes-dashboard
+ KUBE_EDITOR="sed -i \"s|nodePort\: .*|nodePort\: $node_port|g\"" kubectl -n kube-system edit service kubernetes-dashboard
master_ip=$(kubectl cluster-info | grep "Kubernetes master" | awk -F ":" '{print $2}')
- node_port=$(kubectl get service -n kube-system | grep kubernetes-dashboard | awk '{print $5}' |awk -F "[:/]" '{print $2}')
printf "Kubernetes Info\n===============\n" > $k8s_info_file
echo "Dashboard URL: https:$master_ip:$node_port" >> $k8s_info_file