From 43285f872ef4fc82271cb0ef769321ba57d4873f Mon Sep 17 00:00:00 2001 From: Mike Spreitzer Date: Wed, 10 Feb 2016 23:38:32 -0500 Subject: [PATCH] Deploy dashboard instead of extiinct kube-ui Updated cluster/ubuntu/deployAddons.sh to deploy the UI that exists rather than the old one that no longer exists. Resolves #20992 --- cluster/ubuntu/deployAddons.sh | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/cluster/ubuntu/deployAddons.sh b/cluster/ubuntu/deployAddons.sh index e9ce43d6534..a5fa809bc22 100755 --- a/cluster/ubuntu/deployAddons.sh +++ b/cluster/ubuntu/deployAddons.sh @@ -59,22 +59,20 @@ function deploy_dns { echo } -function deploy_ui { - echo "Deploying Kubernetes UI..." +function deploy_dashboard { + if ${KUBECTL} get rc -l k8s-app=kubernetes-dashboard --namespace=kube-system | grep kubernetes-dashboard-v &> /dev/null; then + echo "Kubernetes Dashboard replicationController already exists" + else + echo "Creating Kubernetes Dashboard replicationController" + ${KUBECTL} create -f ${KUBE_ROOT}/cluster/addons/dashboard/dashboard-controller.yaml + fi - KUBEUI=`eval "${KUBECTL} get services --namespace=kube-system | grep kube-ui | cat"` - - if [ ! "$KUBEUI" ]; then - # use kubectl to create kube-ui rc and service - ${KUBECTL} --namespace=kube-system create \ - -f ${KUBE_ROOT}/cluster/addons/kube-ui/kube-ui-rc.yaml - ${KUBECTL} --namespace=kube-system create \ - -f ${KUBE_ROOT}/cluster/addons/kube-ui/kube-ui-svc.yaml - - echo "Kube-ui rc and service is successfully deployed." - else - echo "Kube-ui rc and service is already deployed. Skipping." - fi + if ${KUBECTL} get service/kubernetes-dashboard --namespace=kube-system &> /dev/null; then + echo "Kubernetes Dashboard service already exists" + else + echo "Creating Kubernetes Dashboard service" + ${KUBECTL} create -f ${KUBE_ROOT}/cluster/addons/dashboard/dashboard-service.yaml + fi echo } @@ -86,6 +84,6 @@ if [ "${ENABLE_CLUSTER_DNS}" == true ]; then fi if [ "${ENABLE_CLUSTER_UI}" == true ]; then - deploy_ui + deploy_dashboard fi