Reputation: 385
I am unable to access the Kibana server UI through ingress path url I have deployed the Kibana pod along with Elasticsearch on Kubernetes cluster. While access the UI it is stating as "503 service unavailable" and it is re-directing path as https://myserver.com/spaces/enter. Both the elasticsearch and kibana pods are running. And I am able to curl my elasticsearch pod through my ingress path url. Can someone help with the issue.
Kibana yaml files:
deployment.yaml
---
apiVersion: "apps/v1"
kind: "Deployment"
metadata:
name: "kibana-development"
namespace: "development"
spec:
selector:
matchLabels:
app: "kibana-development"
replicas: 1
strategy:
type: "RollingUpdate"
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
minReadySeconds: 5
template:
metadata:
labels:
app: "kibana-development"
spec:
containers:
-
name: "kibana-development"
image: "docker.elastic.co/kibana/kibana:7.10.2"
imagePullPolicy: "Always"
env:
- name: "ELASTICSEARCH_HOSTS"
value: "https://my-server.com/elasticsearch"
ports:
-
containerPort: 5601
protocol: TCP
imagePullSecrets:
-
name: "kibana"
service.yaml
---
apiVersion: "v1"
kind: "Service"
metadata:
name: "kibana-development"
namespace: "development"
labels:
app: "kibana-development"
spec:
ports:
-
port: 56976
targetPort: 5601
selector:
app: "kibana-development"
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.com"
http:
paths:
-
backend:
serviceName: "kibana-development"
servicePort: 56976
path: "/kibana/(.*)"
I am able to access Kibana through cliuster-ip:port, but not with ingress path url. Is there any annotations that I am missing? Or the version 7.10.2 for elasticsearch and kibana not stable. I checked my endpoint, it is showing my cluster-ip
Upvotes: 0
Views: 2887
Reputation: 385
Issue resolved now, needed to add the below two env variables in deployment.yaml file.
-
name: "SERVER_BASEPATH"
value: "/kibana-development"
-
name: "SERVER_REWRITEBASEPATH"
value: "false"
Don't forget the "/" in SERVER_BASEPATH value
Upvotes: 2