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

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

---
  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

---
  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

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

cc @jbudz ?

Thanks
Rashmi

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

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

1 Like