ERR_TOO_MANY_REDIRECTS 302 with ELK Operator 7.10.0

hello,

i have an Elastick stack elasticsearch and kibana 7.10.0 using elk operator in kubernetes

Whene i make the link https://monitoring.cloudapp.azure.com/kibana i have this redirection :

https://monitoring.cloudapp.azure.com/kibana/login?next=%2Fkibana%2Fkibana%2Flogin%3Fnext%3D%252Fkibana%252Fkibana%252Flogin%253Fnext%253D%25252Fkibana%25252Fkibana%25......

in the pod logs :

"type":"response","@timestamp":"2020-12-23T15:38:27Z","tags":,"pid":7,"method":"get","statusCode":302,"req":{"url":"/kibana/login?next=%2Fkibana%2Fkibana%2Flogin%3Fnext%3D%252Fkibana%252.....

Kibana.yaml

apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
  name: kibana
spec:
  version: 7.10.0
  count: 1
  elasticsearchRef:
    name: elastic-https
  http:
    service:
      spec:
        type: ClusterIP
    tls:
      selfSignedCertificate:
        disabled: true
  podTemplate:
    spec:
      containers:
      - name: kibana
        env:
        - name: SERVER_BASEPATH
          value: "/kibana"
        resources:
          requests:
            memory: 4Gi
            cpu: 1
          limits:
            memory: 8Gi
            cpu: 2
    metadata:
      annotations:
        sidecar.istio.io/rewriteAppHTTPProbers: "true"

kibana.ingress.yaml

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: istio
  name: kibana-ingress
spec:
  rules:
    - host: "monitoring.cloudapp.azure.com"
      http:
        paths:
          - path: /kibana/login.*
            backend:
              serviceName: kibana-kb-http
              servicePort: 5601
          - path: /kibana
            backend:
              serviceName: kibana-kb-http
              servicePort: 5601
          - path: /kibana/*
            backend:
              serviceName: kibana-kb-http
              servicePort: 5601

Any idea please.
thanks

Can you try opening in an incognito window? We most commonly see this when a session cookie can't be decrypted, caused by logging in across restarts.

If that doesn't work I would target the proxy configuration next. We can probably simplify the rules to one /kibana/ path and go from there. I'm not too familiar with the proxy configuration here, but generally kibana will want a trailing slash to start the redirect process.

no ay with incognito window i have the same problem whene i do a kubectl port-forward i have the same problem with the redirection (with http)

http://localhost:52000/kibana/login?next=%2Fkibana%2Fkibana%2Flogin%3Fnext%

Can you try setting SERVER_REWRITEBASEPATH to true, ref and removing the proxy rewrite rules?

when i add the SERVER_REWRITEBASEPATH then i have a readinessProbe problem and the kibana doesn't starts

  readinessProbe:
        httpGet:
          path: /login
          port: 5601
          scheme: HTTP
        initialDelaySeconds: 10
        timeoutSeconds: 5
        periodSeconds: 10
        successThreshold: 1
        failureThreshold: 3

Does that include the base path? I would set it to something like localhost:5601/kibana/api/status

it's ok for me it works well
i aded

apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
  name: kibana
spec:
  config:
    server.rewriteBasePath: true

and

  containers:
  - name: kibana
    readinessProbe:
      httpGet:
        scheme: HTTP
        path: /kibana
        port: 5601

thank you very much @jbudz

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