Got 302 code when curl kibana ingress URL

my ELK stack is running in AKS, when I try to curl the Kibana ingress URL, I got 302 code and and I see it is redirected to /spaces/enter. I wonder why and how I can make it to work.

curl http:/app/kibana

  • About to connect() to 135.170.111.210 port 80 (#0)
  • Trying 135.170.111.210... connected
  • Connected to 135.170.111.210 (135.170.111.210) port 80 (#0)

GET /app/kibana HTTP/1.1
User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.44 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Host:
Accept: /

< HTTP/1.1 302 Found
< Server: nginx/1.19.2
< Date: Mon, 12 Jul 2021 05:29:19 GMT
< Content-Length: 0
< Connection: keep-alive
< location: /spaces/enter
< x-content-type-options: nosniff
< referrer-policy: no-referrer-when-downgrade
< kbn-name: kibana-kibana-54c46c54d6-4fkb5
< kbn-license-sig: a5e6854b5b56abfc613d1cba3f90b0df419f165d0b34c3c637f0f768ac77001c
< cache-control: private, no-cache, no-store, must-revalidate
<

Is this for a health check? Just curious about what goal we're looking for.

If it is I would recommend curl http://app/kibana/api/status

This is for accessing Kibana web site externally, i.e. from outside of the AKS. With the ingress rules, I should be able to access the Kibana site externally using "curl http:///app/kibana". But I got 404 error. When I tried to login to the Kibana container, and run "curl http://localhost:5601" , I got the same thing, i.e. it is redirected to /spaces/enter. I don't know why it is directed to /spaces/enter. Shouldn't it be redirected to the Kibana web site?

Below is from inside of the Kibana container, the output from running curl:
[ls4074@starfish etc]$ kubectl exec -it kibana-kibana-76c7d9fd6f-mwlkh -n elk -- curl -v http://localhost:5601

  • Rebuilt URL to: http://localhost:5601/
  • Trying ::1...
  • TCP_NODELAY set
  • connect to ::1 port 5601 failed: Connection refused
  • Trying 127.0.0.1...
  • TCP_NODELAY set
  • Connected to localhost (127.0.0.1) port 5601 (#0)

GET / HTTP/1.1
Host: localhost:5601
User-Agent: curl/7.61.1
Accept: /

< HTTP/1.1 302 Found
< location: /spaces/enter
< x-content-type-options: nosniff
< referrer-policy: no-referrer-when-downgrade
< kbn-name: kibana-kibana-76c7d9fd6f-mwlkh
< kbn-license-sig: a5e6854b5b56abfc613d1cba3f90b0df419f165d0b34c3c637f0f768ac77001c
< cache-control: private, no-cache, no-store, must-revalidate
< content-length: 0
< Date: Tue, 13 Jul 2021 03:30:13 GMT
< Connection: keep-alive
< Keep-Alive: timeout=120
<

  • Connection #0 to host localhost left intact

However, if I run "curl http://localhost:5601/app/kibana, it returns the web content.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.