# Got 302 code when curl kibana ingress URL

**URL:** <https://discuss.elastic.co/t/got-302-code-when-curl-kibana-ingress-url/278378>\
**Category:** Kibana\
**Created:** [July 12, 2021, 5:43am UTC](https://discuss.elastic.co/t/got-302-code-when-curl-kibana-ingress-url/278378 "2021-07-12T05:43:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ls4074](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@ls4074](https://discuss.elastic.co/u/ls4074)\
**Post date:** [July 12, 2021, 5:43am UTC](https://discuss.elastic.co/t/got-302-code-when-curl-kibana-ingress-url/278378/1 "2021-07-12T05:43:17Z")

</div>

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  
\<

---

<div class="post-metadata">

**Author:** ![jbudz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jbudz/32/45922_2.png) [@jbudz](https://discuss.elastic.co/u/jbudz)\
**Post date:** [July 12, 2021, 6:16pm UTC](https://discuss.elastic.co/t/got-302-code-when-curl-kibana-ingress-url/278378/2 "2021-07-12T18:16:11Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![ls4074](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@ls4074](https://discuss.elastic.co/u/ls4074)\
**Post date:** [July 13, 2021, 3:33am UTC](https://discuss.elastic.co/t/got-302-code-when-curl-kibana-ingress-url/278378/3 "2021-07-13T03:33:53Z")

</div>

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](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](http://localhost:5601)

- Rebuilt URL to: [http://localhost:5601/](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](http://localhost:5601/app/kibana), it returns the web content.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 10, 2021, 3:34am UTC](https://discuss.elastic.co/t/got-302-code-when-curl-kibana-ingress-url/278378/4 "2021-08-10T03:34:45Z")

</div>

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