# Kibana with basePath login redirect loop on GCP

**URL:** <https://discuss.elastic.co/t/kibana-with-basepath-login-redirect-loop-on-gcp/260115>\
**Category:** Kibana\
**Created:** [January 4, 2021, 5:43pm UTC](https://discuss.elastic.co/t/kibana-with-basepath-login-redirect-loop-on-gcp/260115 "2021-01-04T17:43:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![uncl3mar1k](https://avatars.discourse-cdn.com/v4/letter/u/f07891/32.png) [@uncl3mar1k](https://discuss.elastic.co/u/uncl3mar1k)\
**Post date:** [January 4, 2021, 5:43pm UTC](https://discuss.elastic.co/t/kibana-with-basepath-login-redirect-loop-on-gcp/260115/1 "2021-01-04T17:43:52Z")

</div>

On a regular GKE private cluster I

1. Installed ECK (`kubectl apply -f https://download.elastic.co/downloads/eck/1.3.1/all-in-one.yaml`)
2. Installed Elasticsearch and Kibana:

```auto
    apiVersion: v1

    kind: Namespace

    metadata:

      name: elastic

      labels:

        name: elastic

        istio-injection: enabled

    ---

    apiVersion: elasticsearch.k8s.elastic.co/v1

    kind: Elasticsearch

    metadata:

      name: monitoring

      namespace: elastic

    spec:

      version: 7.10.1

      http:

        tls: 

          selfSignedCertificate:

            disabled: true

      nodeSets:

      - name: default

        count: 1

        config:

          node.store.allow_mmap: false

    ---

    apiVersion: kibana.k8s.elastic.co/v1

    kind: Kibana

    metadata:

      name: monitoring

      namespace: elastic

    spec:

      version: 7.10.1

      count: 1

      elasticsearchRef:

        name: monitoring

      # config:

      # xpack.security.enabled: false

      http:

        tls: 

          selfSignedCertificate:

            disabled: true

      podTemplate:

        spec:

          containers:

          - name: kibana

            env:

            - name: SERVER_BASEPATH

              value: "/kibana"

```

1. port-forward: `kubectl -n elastic port-forward service/monitoring-kb-http 5601`

Web preview in the browser on port 5061 returns `ERR_TOO_MANY_REDIRECTS`, while the url is `https://....cloudshell.dev/kibana/login?next=%2Fkibana%2Fkibana%2Flogin%3Fnext%3D%252Fkibana%252Fkibana%252Flogin%253Fnext%253D%25252Fkibana%25252Fkibana%25252Flogin%25253Fnext%25253D%2525252Fkibana%2525252Fkibana%2525252Flogin%2525253Fnext%2525253D%252525252Fkibana%252525252Fkibana%252525252Flogin%252525253Fnext%252525253D%25252525252Fkibana%25252525252Fkibana%25252525252Flogin%25252525253Fnext... (and so on)`  
(same issue when I expose Kibana service with istio)

Without the basePath setting, everything works fine. But I want to access Kibana not in the root path so I need the basePath setting to be working.

---

<div class="post-metadata">

**Author:** ![uncl3mar1k](https://avatars.discourse-cdn.com/v4/letter/u/f07891/32.png) [@uncl3mar1k](https://discuss.elastic.co/u/uncl3mar1k)\
**Post date:** [January 11, 2021, 11:46am UTC](https://discuss.elastic.co/t/kibana-with-basepath-login-redirect-loop-on-gcp/260115/2 "2021-01-11T11:46:06Z")

</div>

Any thoughts on this pls.

---

<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:** [January 11, 2021, 5:30pm UTC](https://discuss.elastic.co/t/kibana-with-basepath-login-redirect-loop-on-gcp/260115/3 "2021-01-11T17:30:41Z")

</div>

Can you try deleting the `sid` cookie in your browser, or loading it in another browser or incognito window and see if you still see that happen? The basePath setting just re-writes the URLs, something still has to serve up the site at that path though.

Also check : [https://github.com/elastic/kibana/issues/36825](https://github.com/elastic/kibana/issues/36825)

Thanks  
Rashmi

---

<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:** [February 8, 2021, 5:30pm UTC](https://discuss.elastic.co/t/kibana-with-basepath-login-redirect-loop-on-gcp/260115/4 "2021-02-08T17:30:43Z")

</div>

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