<p>I installed Rancher on my Kubernetes cluster on Azure as described <a href="https://rancher.com/docs/rancher/v2.5/en/installation/install-rancher-on-k8s/aks/" rel="nofollow noreferrer">here</a>. I ran the following command:</p>
<pre><code>helm install rancher rancher-latest/rancher --namespace cattle-system --set hostname=rancher.mydomain.com --set replicas=1 --set ingress.tls.source=secret --set bootstrapPassword=someRandomPassword
</code></pre>
<p>Rancher was installed successfully and when I opened the page at rancher.mydomain.com, it showed the admin login page. I tried the password I had used in the previous command but it wouldn't log in. I kept getting the error in the following screenshot:</p>
<p><a href="https://i.stack.imgur.com/OKdz5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OKdz5.png" alt="enter image description here" /></a></p>

<p>@Mar Chal</p>
<p>Try below command to reset password it will work.</p>
<pre><code>[]$ kubectl -n cattle-system exec $(kubectl -n cattle-system get pods -l app=demo-rancher | grep '1/1' | head -1 | awk '{ print $1 }') -- reset-password
W1214 11:55:25.230447     127 client_config.go:615] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
New password for default admin user (user-zkgpr):
oH9ySxxxxxxxxx7q_1767o
</code></pre>
