+
```bash
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
```
+
+
+
See more info on Grafana ArtifactHUB [https://artifacthub.io/packages/helm/grafana/grafana](https://artifacthub.io/packages/helm/grafana/grafana)
By installing the Chart with the release name `my-grafana`, you add the VictoriaMetrics datasource with official dashboard and kubernetes dashboard:
+
+
```yaml
cat <
+
By running this command we:
* Install Grafana from helm repository.
* Provision VictoriaMetrics datasource with the url from the output above which we copied before.
@@ -188,18 +218,32 @@ By running this command we:
* Add this [https://grafana.com/grafana/dashboards/14205](https://grafana.com/grafana/dashboards/14205) dashboard to see Kubernetes cluster metrics.
-See the output log in your terminal. Copy, paste and run these commands.
-The first one will show `admin` password for Grafana admin.
-The second and the third will forward Grafana to `127.0.0.1:3000`:
+Check the output log in your terminal.
+To see the password for Grafana `admin` user use the following command:
+
+
```bash
kubectl get secret --namespace default my-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
+```
+
+
+Expose Grafana service on `127.0.0.1:3000`:
+
+
+
+```bash
export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=grafana,app.kubernetes.io/instance=my-grafana" -o jsonpath="{.items[0].metadata.name}")
kubectl --namespace default port-forward $POD_NAME 3000
```
+
+
+Now Grafana should be accessible on the [http://127.0.0.1:3000](http://127.0.0.1:3000) address.
+
+
**4. Check the obtained result in your browser**
To check that VictoriaMetrics has collected metrics from the k8s cluster open in browser [http://127.0.0.1:3000/dashboards](http://127.0.0.1:3000/dashboards) and choose `Kubernetes Cluster Monitoring (via Prometheus)` dashboard. Use `admin` for login and `password` that you previously obtained from kubectl.