# Ingress for Kibana dashboard when using kubernetes & traefik

**URL:** <https://discuss.elastic.co/t/ingress-for-kibana-dashboard-when-using-kubernetes-traefik/198236>\
**Category:** Kibana\
**Created:** [September 5, 2019, 11:34am UTC](https://discuss.elastic.co/t/ingress-for-kibana-dashboard-when-using-kubernetes-traefik/198236 "2019-09-05T11:34:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vrider](https://avatars.discourse-cdn.com/v4/letter/v/87869e/32.png) [@vrider](https://discuss.elastic.co/u/vrider)\
**Post date:** [September 5, 2019, 11:34am UTC](https://discuss.elastic.co/t/ingress-for-kibana-dashboard-when-using-kubernetes-traefik/198236/1 "2019-09-05T11:34:16Z")

</div>

Dear Colleagues,

I've followed a get started guide on [https://www.elastic.co/elasticsearch-kubernetes](https://www.elastic.co/elasticsearch-kubernetes)

I've deployed es + kibana in the way described there.  
If I curl from master instance , it works

curl -I -k -u elastic:$PASSWORD 111.11.1.11:5601/app/kibana  
HTTP/1.1 200 OK  
content-security-policy: script-src 'unsafe-eval' 'nonce-xxxxxxxxx'; worker-src blob:; child-src blob:  
kbn-name: kibana  
kbn-xpack-sig: 24402aaf1221ff23f12f12f12f12f12f  
cache-control: no-cache  
content-type: text/html; charset=utf-8  
content-length: 81330  
vary: accept-encoding  
connection: close  
Date: Thu, 03 Sep 2019 11:23:25 GMT

Though, in front of kibana there is a traefik LB  
So, if I would go to a mapped route /kibana (mapped to kibana service + 5601 port) , this results in a redirection to "login?next=%2F"

HTTP/1.1 302 Found  
location: /login?next=%2F  
kbn-name: kibana  
kbn-xpack-sig: 24402ca2235df0b3dc31c96be2fbfa3a  
content-type: text/html; charset=utf-8  
cache-control: no-cache

So, kibana redirects to a wrong base path.  
In documentation i found that there is a possibility to set a base path like :  
env

- name: SERVER\_BASEPATH  
value: /api/xxx

How to better implement it taking into account implementation in [https://www.elastic.co/elasticsearch-kubernetes](https://www.elastic.co/elasticsearch-kubernetes)

---

<div class="post-metadata">

**Author:** ![vrider](https://avatars.discourse-cdn.com/v4/letter/v/87869e/32.png) [@vrider](https://discuss.elastic.co/u/vrider)\
**Post date:** [September 5, 2019, 12:05pm UTC](https://discuss.elastic.co/t/ingress-for-kibana-dashboard-when-using-kubernetes-traefik/198236/2 "2019-09-05T12:05:02Z")

</div>

Found the solution.  
Apparently, in earlier versions \<0.9 of eck operator this was not possible and was a limitation.

Now, starting for version 0.9 SERVER\_BASEPATH via env is supported and a lot more.  
Cooooll!

To check the eck operator version, looks in kind: StatefulSet - name: elastic-operator \> ,  
containers:

- image: [docker.elastic.co/eck/](http://docker.elastic.co/eck/) **eck-operator:0.9.0**

Solution (in kibana operator file):

```
  podTemplate:
    metadata:
      labels:
        app: kibana
        function: logging
    spec:
      containers:
      - name: kibana
        env:
          - name: SERVER_BASEPATH
            value: /kibana

```

**Found this in :**

> <https://github.com/pires/kubernetes-elasticsearch-cluster/issues/119>

  

> <https://github.com/elastic/cloud-on-k8s/issues/942>

  

> <https://github.com/elastic/cloud-on-k8s/issues/740>

---

<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:** [October 3, 2019, 12:14pm UTC](https://discuss.elastic.co/t/ingress-for-kibana-dashboard-when-using-kubernetes-traefik/198236/3 "2019-10-03T12:14:22Z")

</div>

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