我无法通过入口路径url访问Kibana服务器UI,我已经在Kubernetes集群上部署了Kibana pod和Elasticsearch。当访问UI时,它显示为"503服务不可用“,并将路径重定向为https://myserver.com/spaces/enter。elasticsearch和kibana pod都在运行。并且我能够通过我的入口路径url卷曲我的elasticsearch pod。有人能帮忙解决这个问题吗。
Kibana yaml文件:
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/(.*)"我可以通过cliuster-ip:port访问Kibana,但不能使用入口路径url。有没有我遗漏的注解?或者用于elasticsearch和kibana的7.10.2版不稳定。我检查了我的端点,它显示了我的cluster-ip
发布于 2021-06-08 21:37:57
现在问题解决了,需要在deployment.yaml文件中添加以下两个环境变量。
-
name: "SERVER_BASEPATH"
value: "/kibana-development"
-
name: "SERVER_REWRITEBASEPATH"
value: "false"不要忘记SERVER_BASEPATH值中的"/“
https://stackoverflow.com/questions/67872452
复制相似问题