Home > Software design >  Unable to login to local Grafana installed with helm on Kubernetes
Unable to login to local Grafana installed with helm on Kubernetes

Time:08-02

I cannot login to Grafana via http://localhost:3000 on Windows after installing loki via helm on a K8S cluster hosted on GCP. I am following the official documentation here: https://grafana.com/docs/loki/latest/installation/microservices-helm/ Once I login to my K8S cluster on GCP, I install loki grafana via:

helm upgrade --install --namespace=monitoring promtail grafana/promtail --set "loki.serviceName=loki"
helm upgrade --install loki --namespace=monitoring grafana/loki-distributed
helm install --namespace=monitoring loki-grafana grafana/grafana

But when I arrive to this command to return the admin password to login, the full command returns seemingly the entire json response:

kubectl get secret --namespace monitoring loki-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo

but if I only do

kubectl get secret --namespace monitoring loki-grafana -o jsonpath="{.data.admin-password}"

UFlPV1dDUkw3NkVxdlFNTU84UXpPMHVkbW9PeXNrTUY5Z3lFeXR.... Then to expose the port:

kubectl port-forward service/loki-grafana 3000:80 -n monitoring

Then access the GUI via local web-browser at http:localhost:3000. I get denied with user="admin", password="UFlPV1dDUkw3NkVxdlFNTU84UXpPMHVkbW9PeXNrTUY5Z3lFeXR...."

I am not sure how to debug this process. I installed base64 via chocolatey in the admin powershell via: choco install base64

CodePudding user response:

From what I see, you should base64 decode the password before entering it into the UI. If that doesn‘t help you could restart the grafsna pod.

  • Related