# Access the Kubernetes Dashboard Grafana

### Prerequisites

* Kubernetes 1.19+
* Helm 3+

### Get Helm Repository Info

```
sudo helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
sudo helm repo update
```

### Install Helm Chart

<pre><code><strong>sudo helm install [RELEASE_NAME] prometheus-community/kube-prometheus-stack
</strong></code></pre>

<figure><img src="/files/rHnbu5t39pSZnib4jd0p" alt=""><figcaption></figcaption></figure>

Once this is done, you can verify if the deployment is running.

<figure><img src="/files/bEmDkgWiC8CkiAT7iAYc" alt=""><figcaption></figcaption></figure>

Now, to expose the dashboard for external access, you need to change the service's ClusterIP type to NodePort. You can do this with an ingress or by editing the file:

```
sudo kubectl edit service grafana
```

<figure><img src="/files/RyMPIKI8hOjniUj4bkk9" alt=""><figcaption></figcaption></figure>

After making the change to `NodePort`, save and close the file. When performing a new query, you'll notice that the type has changed, and a new port has been added.

<figure><img src="/files/Of1AOTwqPHXycUq6KZsE" alt=""><figcaption></figcaption></figure>

Once this is done, you should have access to the dashboard through the public IP of your instance, along with the released port.

<figure><img src="/files/kXzUdA3TjObWBfWVnj9X" alt=""><figcaption></figcaption></figure>

Default credential:\
user: `admin`\
pass: `prom-operator`

When you access the dashboard, you will find it ready for monitoring.

<figure><img src="/files/WQ2G8nJB2TbTGa6SaYKE" alt=""><figcaption></figcaption></figure>

When installing Grafana, several default dashboards are included. You can customize them or create your own dashboard as needed.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stakepool.dev.br/polygon/kubernetes/access-the-kubernetes-dashboard-grafana.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
