Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions docs/grafana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,9 @@ To quickly test metrics locally (without installing Prometheus Grafana in the cl
```
2. Get the serviceaccount's token to enable local access to metrics
```bash
TOKEN=$(kubectl get secrets -o=json -n ${NAMESPACE} | jq -r '[.items[] |
select (
.type == "kubernetes.io/service-account-token" and
.metadata.annotations."kubernetes.io/service-account.name" == "devworkspace-controller-serviceaccount")][0].data.token' \
| base64 --decode)
TOKEN=$(kubectl create token devworkspace-controller-serviceaccount -n ${NAMESPACE} --duration=1h)
```
NOTE: For development purposes, a non-expiring token can be created instead: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#manually-create-a-long-lived-api-token-for-a-serviceaccount
3. In another terminal, use `kubectl port-forward` to expose the controller's service locally
```bash
kubectl port-forward service/devworkspace-controller-metrics 8443:8443 &
Expand Down
Loading