From ae60398cd459a88965db598b10d645c1ea768d35 Mon Sep 17 00:00:00 2001 From: dlorenc Date: Thu, 2 Jun 2016 11:13:18 -0700 Subject: [PATCH] Make the dashboard service listen on a NodePort. This makes it easier to access the dashboard. --- README.md | 8 ++++++++ deploy/addons/dashboard-svc.yaml | 1 + 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index 4998d80026..dd42126560 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,14 @@ Stopping local Kubernetes cluster... Stopping "minikubeVM"... ``` +### Dashboard + +To access the dashboard, run this command in a shell after starting minikube to get the address: +```shell +echo $(minikube ip):$(kubectl get service kubernetes-dashboard --namespace=kube-system -o=jsonpath='{.spec.ports[0].nodePort}{"\n"}') +``` +And then copy/paste that into your browser. + ## Features * Minikube packages and configures a Linux VM, Docker and all Kubernetes components, optimized for local development. * Minikube supports Kubernetes features such as: diff --git a/deploy/addons/dashboard-svc.yaml b/deploy/addons/dashboard-svc.yaml index 7cf55a6f00..da3ba941e2 100644 --- a/deploy/addons/dashboard-svc.yaml +++ b/deploy/addons/dashboard-svc.yaml @@ -22,6 +22,7 @@ metadata: app: kubernetes-dashboard kubernetes.io/cluster-service: "true" spec: + type: NodePort ports: - port: 80 targetPort: 9090