Open msapitree opened 2 weeks ago
What you are trying to do is currently not supported. The operator, as you have found out is not aware of the server.basePath
setting. The only work around I can think of is to try to do the rewrite proxy side with an ingress implementation specific path (e.g for nginx)
We could potentially inspect the Kibana config and adjust the paths. But it is a bit tricky your example shows. You are using environment variables while the more idiomatic way would be to use the config
attribute:
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
name: kibana
spec:
version: 8.14.0
count: 1
elasticsearchRef:
name: elasticsearch
config:
server:
basePath: /kibana
rewriteBasePath: true
A potential "fix" for this bug would probably only look at the config
element.
Bug Report
What did you do?
Following quickstart 1) Deployed ECK 2) Deployed Elastic resource 3) Deployed Kibana resource 4) Redeployed Kibana resource with config modification (to setup public access to Kibana via k8s ingress on
https://xxx.mydomain.com/monitoring/kibana
): 5) Deployed Fleet Server Agent (together with ClusterRole, ClusterRoleBinding and ServiceAccount)What did you expect to see?
What did you see instead? Under which circumstances?
error in operator log
failed to request http://monitoring-kb-http.monitoring-at.svc:5601/api/fleet/setup, status is 404)
Due to the change to server context, the URL path
/api/fleet/setup
is no longer valid and should have become/monitoring/kibana/api/fleet/setup
considering theserver.basePath
config parameter (or it's env variable equivalent).no health information on elastic resource
NAME HEALTH NODES VERSION AGE apmserver.apm.k8s.elastic.co/monitoring green 1 8.14.0 5d21h
NAME HEALTH NODES VERSION PHASE AGE elasticsearch.elasticsearch.k8s.elastic.co/monitoring green 3 8.14.0 Ready 5d22h
NAME HEALTH NODES VERSION AGE kibana.kibana.k8s.elastic.co/monitoring green 1 8.14.0 114m
Client Version: v1.29.3 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: v1.28.9
Fleet Server
Logs: