Hi everyone, I'm trying to expose Kibana behind of a GCE ingress, but the ingress reporting the kibana service as UNHEALTHY while it is healthy and ready. Just note that the healthcheck created by the Ingress is still using the default value HTTP on / using the nodeport. Changing the value in GCP console to HTTPS on /login and Port: 5601 doesn't change anything and the service still reported Unhealthy.
I'm using ECK 1.3.1 and below are my configs. I'm I missing anything? Thank you in advance.
You probably need to enable TLS between GCLB and Kibana by adding the service.alpha.kubernetes.io/app-protocols annotation to the pod. There is an example of this at:
Hi @charith-elastic, thank you for the quick reply. Straight to the point !
That annotation was missing In kibana service definition.
Can you please point any tutorial or example on how to expose kibana service using a subpath in the Ingress. I'm currently having 404 error. Thank you in advance.
I couldn't find a tutorial so I tried it out myself.
Say you want to expose Kibana under the subpath /kibana. You first need to configure Kibana to be aware of this by setting server.basePath, server.rewriteBasePath and server.publicBaseUrl. Then you need to update the readiness probe so that it uses the new path to /login.
---
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
name: hulk
labels:
app: hulk
spec:
version: 7.11.2
count: 1
config:
server:
basePath: "/kibana"
rewriteBasePath: true
publicBaseUrl: "https://elastic.stack/kibana"
http:
service:
metadata:
labels:
app: hulk
annotations:
# Enable TLS between GCLB and the application
cloud.google.com/app-protocols: '{"https":"HTTPS"}'
service.alpha.kubernetes.io/app-protocols: '{"https":"HTTPS"}'
# Comment out the following line if you are not using a VPC-native cluster
cloud.google.com/neg: '{"ingress": true}'
elasticsearchRef:
name: hulk
podTemplate:
spec:
containers:
- name: kibana
readinessProbe:
# Override the readiness probe as GCLB reuses it for its own healthchecks
httpGet:
scheme: HTTPS
path: "/kibana/login"
port: 5601
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.