# Kibana url redirecting to /space/enter and giving 503 error when deployed on Kubernetes cluster

**URL:** <https://discuss.elastic.co/t/kibana-url-redirecting-to-space-enter-and-giving-503-error-when-deployed-on-kubernetes-cluster/275257>\
**Category:** Kibana\
**Created:** [June 8, 2021, 8:43am UTC](https://discuss.elastic.co/t/kibana-url-redirecting-to-space-enter-and-giving-503-error-when-deployed-on-kubernetes-cluster/275257 "2021-06-08T08:43:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shubham\_Dhote](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shubham_dhote/32/76864_2.png) [@Shubham\_Dhote](https://discuss.elastic.co/u/Shubham_Dhote)\
**Post date:** [June 8, 2021, 8:43am UTC](https://discuss.elastic.co/t/kibana-url-redirecting-to-space-enter-and-giving-503-error-when-deployed-on-kubernetes-cluster/275257/1 "2021-06-08T08:43:33Z")

</div>

I have deployed Kibana and elasticsearch pods in Kubernetes cluster, I have created ingress path url for both of them. Elasticsearch is accessible with ingress path url, but when trying to access kibana ui with ingress url, it is redirecting the page to /space/enter and giving 503 error.

ingress.yaml

```auto
---
  apiVersion: "networking.k8s.io/v1beta1"
  kind: "Ingress"
  metadata: 
    name: "kibana-development-ingress"
    namespace: "development"
    annotations: 
      nginx.ingress.kubernetes.io/rewrite-target: "/$1"
  spec: 
    rules: 
      - 
        host: "my-server"
        http: 
          paths: 
            - 
              backend: 
                serviceName: "kibana-development"
                servicePort: 56976
              path: "/kibana/(.*)"

```

service.yaml

```auto
---
  apiVersion: "v1"
  kind: "Service"
  metadata: 
    name: "kibana-development-service"
    namespace: "development"
    labels: 
      app: "kibana-development"
  spec: 
    ports: 
      - 
        port: 56976
        targetPort: 5601
    selector: 
      app: "kibana-development"

```

Can someone help with this

---

<div class="post-metadata">

**Author:** ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)\
**Post date:** [June 8, 2021, 9:12pm UTC](https://discuss.elastic.co/t/kibana-url-redirecting-to-space-enter-and-giving-503-error-when-deployed-on-kubernetes-cluster/275257/2 "2021-06-08T21:12:40Z")

</div>

> [@Shubham\_Dhote](#):
>
> /space/enter and giving 503 error

Hmm, 503 is "service unavailable", have you verified that Kibana is up and running? Could you provide the Kibana logs?

cc @jbudz ?

Thanks  
Rashmi

---

<div class="post-metadata">

**Author:** ![Shubham\_Dhote](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shubham_dhote/32/76864_2.png) [@Shubham\_Dhote](https://discuss.elastic.co/u/Shubham_Dhote)\
**Post date:** [June 9, 2021, 3:57am UTC](https://discuss.elastic.co/t/kibana-url-redirecting-to-space-enter-and-giving-503-error-when-deployed-on-kubernetes-cluster/275257/3 "2021-06-09T03:57:17Z")

</div>

Hi, The issue is resolved now. Need to add the below two environment variables in deployment.yaml file.

```auto
- 
  name: "SERVER_BASEPATH"
  value: "/kibana-development"
                
-
  name: "SERVER_REWRITEBASEPATH"
  value: "false"

```

---

<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:** [July 7, 2021, 3:57am UTC](https://discuss.elastic.co/t/kibana-url-redirecting-to-space-enter-and-giving-503-error-when-deployed-on-kubernetes-cluster/275257/4 "2021-07-07T03:57:25Z")

</div>

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