I am unable to log in to the Kibana dashboard. After providing the credentials, it keeps redirecting me back to the login page

Hello Everyone,

I am new to the ELK stack and have successfully deployed it in a Kubernetes environment using MetalLB and NGINX Ingress Controller to access the services. However, I am encountering an issue when trying to log in to the Kibana dashboard via a browser. After entering my credentials, I am repeatedly redirected back to the login page.

Interestingly, when I run curl commands against both Elasticsearch and Kibana, I receive a successful response. The version I am using is 8.5.1.

Could anyone please advise on what might be causing this issue and how to resolve it?

Furthermore, I was able to log in to the Kibana dashboard using port forwarding, but I am unable to log in to the NGINX Ingress Controller DNS name.

Thank you for your help!

As port forwarding is working for Kibana, my assumption would be that a proxy (or firewall?) is in between and messing with your traffic :wink:

You can check the network tab for the dev tools of your browser. I assume some requests are blocked, which causes Kibana to decide that authentication/authorization is denied so you are redirected to the login page.

Hi @chouben
Thanks for response.

When I ran the Kibana deployment with a single Kibana pod, the authentication worked fine, and I was able to load the dashboard successfully. However, upon increasing the pod count, I encountered the error mentioned above. As you kindly suggested, I checked it in the Dev Tools and noticed that some requests are being blocked.

kibana-error

Since I'm using nginx ingress controller I used following annotations.
kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: "true"
cert-manager.io/cluster-issuer: "clusterissuer"
nginx.ingress.kubernetes.io/proxy-redirect-from: "/"
nginx.ingress.kubernetes.io/proxy-redirect-to: "/app/kibana"
nginx.ingress.kubernetes.io/backend-protocol: HTTPS
nginx.ingress.kubernetes.io/rewrite-target: /$2
Thanks !

Your bootstrap.js seems to be rejected indeed. To me it still seems like a hop in your network is rejecting the js-file.

Based on your latest comment, you have a different set up than described initially. If I understand correctly, your set up is a clustered env? Port forwarding is working on the clustered env?

This is a 7.15 version, but as sample how it should look like:

I am running an three Elasticsearch pod, three Kibana pods, and three Logstash pods. Both Elasticsearch and Kibana have Ingress resources enabled. My setup is in a clustered environment with multiple pods.

I can log in to the Kibana dashboard using port forwarding with a single Kibana pod as well as with multiple pods.

If I set the pod count to 1, Ingress works fine. However, when more than 1 pod is running in the deployment, it does not work.

I checked the Ingress logs but couldn't find any clue in the logs

Hi

I don't know this tool "Ingress NGINX Controller".

It literally states:

ingress-nginx is an Ingress controller for Kubernetes using NGINX as a reverse proxy and load balancer.

For sure your problem is on that side. You indicated your set up is working without it or by bypassing it. So as per my understanding your questions are not Elastic related but NGINX related..

Sorry, I can't help you further.

Good luck!
Christof

1 Like

Thank you for your support !!