Let’s assume you’ve got a running Kubernetes cluster set up, with some services running and you’d like to monitor the state of the cluster/namespace or specific pods. Using Prometheus along with Grafana is a great solution.
To deploy, just follow these steps by executing the following commands (you’ll need helm installed).
- helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
- helm repo update
- helm install prometheus prometheus-community/kube-prometheus-stack –namespace monitoring –create-namespace
With the last command you should see something like the following
Response was NAME: prometheus LAST DEPLOYED: Sat Jul 26 12:03:34 2025 NAMESPACE: monitoring STATUS: deployed REVISION: 1 NOTES: kube-prometheus-stack has been installed. Check its status by running:
Now to check everything is working and to use Grafana Dashboards, simply use port forwarding, i.e.
kubectl port-forward svc/prometheus-grafana 80:80 -n monitoring
Now you can access http://localhost:80 (or whatever port has been set up).
Default login credentials are username/password admin/prom-operator.
Azure Managed Prometheus
You can also use Azure’s managed Prometheus instance.
I’ve not tried setting this up via Azure, so the steps below are taken from another source (sorry I cannot recall where), feel free to try them
- Enable Azure Monitor Managed Prometheus
- Go to your AKS cluster in the Azure Portal.
- Under Monitoring, enable Managed Prometheus.
- Create Azure Managed Grafana
- Use the Azure Portal or CLI to create a Grafana instance.
- Link it to your Azure Monitor workspace.
- Configure Grafana Data Source
- In Grafana, add a Prometheus data source.
- Use the Azure Monitor workspace query endpoint.
- Assign Permissions
- Ensure your Grafana instance or app registration has the Monitoring Data Reader role on the workspace.