# PMM using Helm on Minikube gives Invalid Username/Password

**URL:** <https://forums.percona.com/t/pmm-using-helm-on-minikube-gives-invalid-username-password/29140>\
**Category:** Percona Monitoring and Management (PMM)\
**Created:** [March 14, 2024, 4:53pm UTC](https://forums.percona.com/t/pmm-using-helm-on-minikube-gives-invalid-username-password/29140 "2024-03-14T16:53:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![brianestrada658](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@brianestrada658](https://forums.percona.com/u/brianestrada658)\
**Post date:** [March 14, 2024, 4:53pm UTC](https://forums.percona.com/t/pmm-using-helm-on-minikube-gives-invalid-username-password/29140/1 "2024-03-14T16:53:50Z")

</div>

## Description:

When trying to install PMM on Minikube via Helm, it installs successfully. But when I try to login as admin user with the decoded password, it gives an invalid username/password.

## Steps to Reproduce:

1. Follow this document: [Percona Monitoring and Management](https://docs.percona.com/percona-monitoring-and-management/setting-up/server/helm.html)

2. Run the following commands:

```auto
   $ helm repo add percona https://percona.github.io/percona-helm-charts/
   $ helm install pmm percona/pmm
   $ kubectl get secret pmm-secret --namespace default -o jsonpath='{.data.PMM_ADMIN_PASSWORD}' | base64 --decode
      - to get the password
   $ minikube service monitoring-service
      - open your browser with the above URL and you should see the login page
      - enter admin as the username, and the password from the one you decoded

```

## Version:

Mac OS: Sonoma 14.3.1  
Minikube: v1.26.1  
Helm: v3.9.4

## Logs:

From the pods, I only see this last few lines:

```auto
2024-03-14 16:48:52,412 INFO exited: qan-api2 (exit status 1; not expected)
2024-03-14 16:48:53,514 INFO spawned: 'qan-api2' with pid 720
2024-03-14 16:48:55,082 INFO success: qan-api2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-03-14 16:49:33,955 INFO exited: pmm-update-perform-init (exit status 0; expected)

```

## Expected Result:

I should be able to login successfully

## Actual Result:

I am getting an invalid username/password

---

<div class="post-metadata">

**Author:** ![Agustin\_G](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/agustin_g/32/14111_2.png) [@Agustin\_G](https://forums.percona.com/u/Agustin_G)\
**Post date:** [March 29, 2024, 3:08am UTC](https://forums.percona.com/t/pmm-using-helm-on-minikube-gives-invalid-username-password/29140/2 "2024-03-29T03:08:24Z")

</div>

Hi @brianestrada658,

Are those commands you sent there in the exact same sequence you ran them? You should first create the secret, and then use `helm install` pointing to it.

Please send us the exact commands you used, and in the exact same order.

The documentation link you pointed to has the correct order and syntax:  
1- Create secret:

> **[Percona Monitoring and Management - Helm](https://docs.percona.com/percona-monitoring-and-management/setting-up/server/helm.html#setup-pmm-admin-password)**
>
> Helm is the package manager for Kubernetes. Percona Helm charts can be found in percona/percona-helm-charts repository on Github.

2- Install:

> **[Percona Monitoring and Management - Helm](https://docs.percona.com/percona-monitoring-and-management/setting-up/server/helm.html#install)**
>
> Helm is the package manager for Kubernetes. Percona Helm charts can be found in percona/percona-helm-charts repository on Github.

Note that the full install command is presented as a multiline shell command:

```auto
helm install pmm \
--set secret.create=false \
--set secret.name=pmm-secret \
percona/pmm

```

Which is the same as running:

```auto
helm install pmm --set secret.create=false --set secret.name=pmm-secret percona/pmm

```

---

<div class="post-metadata">

**Author:** ![Agustin\_Palazuelos](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/agustin_palazuelos/32/16337_2.png) [@Agustin\_Palazuelos](https://forums.percona.com/u/Agustin_Palazuelos)\
**Post date:** [May 8, 2024, 3:51pm UTC](https://forums.percona.com/t/pmm-using-helm-on-minikube-gives-invalid-username-password/29140/3 "2024-05-08T15:51:26Z")

</div>

Hi Guys! I’m having the same issue. I’m trying to deploy PMM using helm chart with terraform and the service is getting deployed but when I try to connect to it using kubectl port-forward I get an error “Invalid username and password”

This is my terraform code

```auto
resource "helm_release" "pmm" {
    name = var.namespace
    chart = "percona/pmm"
    namespace = var.namespace
# version = "1.3.13"
    values = [data.template_file.helm_values.rendered]
    cleanup_on_fail = true
    create_namespace = true

}

```

Here is the helm\_values.yaml file

```auto
secret:
  name: pmm-secret
  create: true
  pmm_password: "admin"
service:
  name: monitoring-service
  type: NodePort
  ports:
    - port: 443
      targetPort: https
      protocol: TCP
      name: https
    - port: 80
      targetPort: http
      protocol: TCP
      name: http

```

I tried setting the create: false value and create the value manually before running the terraform code using this code

```auto
cat <<EOF | kubectl create -n pmm -f -
apiVersion: v1
kind: Secret
metadata:
  name: pmm-secret
  labels:
    app.kubernetes.io/name: pmm
type: Opaque
data:
# base64 encoded password
# encode some password: `echo -n "admin" | base64`
  PMM_ADMIN_PASSWORD: YWRtaW4=
EOF

```

But still got the same error. Not sure what I’m doing wrong. Last week I was working with this same code and everything was working just fine.

when I run the

> kubectl get secret pmm-secret --namespace pmm -o jsonpath=‘{.data.PMM\_ADMIN\_PASSWORD}’ | base64 -d

I get the value for the default password which is admin

 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/2/f/2f37dfb95d40dd4918cf5cf43b804187fc45e1f9.png)

Thanks a lot guys for you help! 😄

PS: I tried installing it with plain helm without terraform using this command but got the same error

```auto
helm repo add percona https://percona.github.io/percona-helm-charts/
helm install pmm \
-n pmm \
--set secret.create=false \
--set secret.name=pmm-secret \
percona/pmm

```

---

<div class="post-metadata">

**Author:** ![Agustin\_Palazuelos](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/agustin_palazuelos/32/16337_2.png) [@Agustin\_Palazuelos](https://forums.percona.com/u/Agustin_Palazuelos)\
**Post date:** [May 10, 2024, 4:10pm UTC](https://forums.percona.com/t/pmm-using-helm-on-minikube-gives-invalid-username-password/29140/4 "2024-05-10T16:10:56Z")

</div>

Ok, the fix was to run the change-admin-password inside te pod and now it’s working!

I did that by running

```auto
kubectl -n pmm exec --stdin --tty pmm-0 -- change-admin-password admin2025

```
