-
Notifications
You must be signed in to change notification settings - Fork 40k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added API variables so Kibana could access ES through the API server #5776
Added API variables so Kibana could access ES through the API server #5776
Conversation
Thank you. Let me think about this. In your case, why not use one of the popular Kibana images instead and set their env vars appropriately? |
I guess I wasnt aware there were other Kibana images out there that would work for this use case. I was trying to keep with the addons that were bundled as part of the project but I see your point. To be honest, I guess Im a little confused on how this works in it's current state. Doesn't setting the ES URL value statically ,as it is now, imply that ES is running on the same host as Kibana? Or is there something in GCE that handles this differently which is why Im having issues on bare metal? |
Believe me, I understand your confusion. I had to drink a lot of whisky to make this work out. No, Kibana does not need to run on the same host as Elasticsearch and the URL is more to do with the vagaries of client-side scripting. In the original version of this work I used arcus/kibana |
Perhaps more later during the work week, but if you are running on a bar metal configuration that I think you may be better off using off the shelf images. |
Sure thing. I'd like to try and understand how it's working as is but we can pick this up in the next day or two (or 3 or 4). When I used the scripts as they are, Kibana was failing trying to access the API server on the local host that Kibana was running on. So if I'm missing something on how that should work I'd like to start there. Thanks!! |
Let's work together on this 1:1 -- email me at satnam@google.com |
70bff07
to
2aaef87
Compare
Sorry for the delay. This looks like a good idea, thank you. |
2aaef87
to
35038dc
Compare
After much fiddling I think I got everything updated. Let me know if it looks ok to you, a lot of this if my first time doing stuff in Git so Im learning as I go. Thanks! |
Thank you kindly for your patience and contribution! |
…afix Added API variables so Kibana could access ES through the API server
I noticed an issue when I was trying to get the fluentd-es-kibana addon running on my bare metal Kubernetes cluster. It appears that the Kibana container is statically configured to point to the local container to get to the API server. From the Kibana docker image run_kibana_nginx.sh...
elasticsearch: "https://"+window.location.hostname+"/api/v1beta1/proxy/services/elasticsearch-logging"
In my case, the API server lives on the master which doesn't host any other pods at all. That being said, I suggest adding the following ENV variables to the Kibana replication controller definition...
-API_PROTOCOL
-API_SERVER
-API_PORT
The PR has these values in the RC definition set to what the container defaults to now. That is...
API_PROTOCOL = HTTPS
-API_SERVER = localhost (logic in the script changes this to the local IP of the pod)
-API_PORT = "" (blank or default of 80)
I tested this by building a new docker image and ensured that the same URL is generated by Kibana for accessing data in ES. Besides adding the 'localhost' logic I just changed the way that the URL was generated by concatenating the ENV variables. I also put the set commands back in to spit certain ENV variables out to console so I could catch them with 'docker logs' during debugging.