Skip to content

Commit

Permalink
Update documents for getting started (kubernetes#5736)
Browse files Browse the repository at this point in the history
  • Loading branch information
shu-mutou authored Dec 21, 2020
1 parent 7d9caba commit 7cfdb00
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions docs/developer/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,6 @@ kubectl proxy

kubectl will handle authentication with Kubernetes and create an API proxy with the address `localhost:8080`. Therefore, no changes in the configuration are required.

Another way to connect to real cluster while developing dashboard is to override default values used by our build pipeline. In order to do that we have introduced two environment variables `KUBE_DASHBOARD_APISERVER_HOST` and `KUBE_DASHBOARD_KUBECONFIG` that will be used over default ones when defined. Before running our npm tasks just do:

```
export KUBE_DASHBOARD_APISERVER_HOST="http://<APISERVER_IP>:<APISERVER_PORT>"
```
or
```
export KUBE_DASHBOARD_KUBECONFIG="<KUBECONFIG_FILE_PATH>"
```

**NOTE: Environment variable `KUBE_DASHBOARD_KUBECONFIG` has higher priority than `KUBE_DASHBOARD_APISERVER_HOST`.**

## Serving Dashboard for Development

Quick updated version:
Expand All @@ -56,6 +44,14 @@ Quick updated version:
npm start
```

Another way to connect to real cluster while developing dashboard is to specify options for `npm` like following:

```
npm run start:https --kubernetes-dashboard:kubeconfig=<path to your kubeconfig>
```

Please see [here](https://github.com/kubernetes/dashboard/blob/master/.npmrc) which options you can specify to run dashboard with `npm`.

Open a browser and access the UI under `localhost:8080`.

In the background, `npm start` makes a [concurrently](https://github.com/kimmobrunfeldt/concurrently#readme) call to start the `golang` backend server and the `angular` development server.
Expand Down

0 comments on commit 7cfdb00

Please sign in to comment.