# Problems accessing Kibana through Traefik Ingress (Kubernetes)

**URL:** <https://discuss.elastic.co/t/problems-accessing-kibana-through-traefik-ingress-kubernetes/239893>\
**Category:** Kibana\
**Created:** [July 4, 2020, 2:05pm UTC](https://discuss.elastic.co/t/problems-accessing-kibana-through-traefik-ingress-kubernetes/239893 "2020-07-04T14:05:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kodo65](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kodo65/32/1185_2.png) [@kodo65](https://discuss.elastic.co/u/kodo65)\
**Post date:** [July 4, 2020, 2:05pm UTC](https://discuss.elastic.co/t/problems-accessing-kibana-through-traefik-ingress-kubernetes/239893/1 "2020-07-04T14:05:56Z")

</div>

I'm running the following:

- v1.17 of Kubernetes
- v0.9 of MetalLB
- v2.2 of Traefik
- v1.1 of ECK

The setup is very basic and manifests look like the following:

```auto
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
  name: logging
  namespace: elastic-system
  annotations:
    traefik.ingress.kubernetes.io/service.sticky.cookie: "true"
spec:
  version: 7.7.0
  count: 1
  elasticsearchRef:
    name: logging
    namespace: elastic-system
# xpack.security.enabled: false
  podTemplate:
    spec:
      containers:
      - name: kibana
        resources:
          limits:
            memory: 4Gi
        env:
          - name: SERVER_BASEPATH
            value: /
  http:
    tls:
      selfSignedCertificate:
        disabled: true

```

```auto
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: ingress-kibana
  namespace: elastic-system
  annotations:
    kubernetes.io/ingress.class: traefik
    traefik.ingress.kubernetes.io/router.entrypoints: http
    traefik.ingress.kubernetes.io/router.pathmatcher: PathPrefix
spec:
  rules:
  - http:
      paths:
      - path: /
        backend:
          serviceName: logging-kb-http
          servicePort: 5601

```

Traefik is published externally by using MetalLB. When accessing Kibana on the exposed IP I'm greeted by the Kibana Welcome/Login screen. However, when I enter "elastic/" I get the following response in the browser:

```auto
    |statusCode|401|
    |---|---|
    |error|"Unauthorized"|
    |message|"[security_exception] unable to authenticate user [elastic] for REST request [/_security/_authenticate], with { header={ WWW-Authenticate={ 0=\"Bearer realm=\\\"security\\\"\" & 1=\"ApiKey\" & 2=\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\" } } }"|

```

The password I use is fetched from the `logging-es-elastic-user` secret.

Furthermore, when I specify (in kibana.yaml):

```auto
    env:
      - name: SERVER_BASEPATH
        value: /logging/kibana

```

and (in ingress.yaml)  
`path /logging/kibana`

I get an URL which "seems to go on forever" - it looks recursive...

What am I doing wrong here? Are there any additional annotations that have to be placed on the Kibana or Ingress resource(s)?

Many, many thanks in advance!!!!

---

<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 1, 2020, 2:06pm UTC](https://discuss.elastic.co/t/problems-accessing-kibana-through-traefik-ingress-kubernetes/239893/2 "2020-08-01T14:06:00Z")

</div>

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