-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Kubernetes] Investigate replacement of NODE_NAME and hostNetwork with status.hostIP #25739
Comments
Pinging @elastic/integrations (Team:Integrations) |
Umm, not sure if we are in the same page, what do you mean by defining the IP? Let me explain my current understanding.
When So if I am right, as Beats are now, they need
Where is the host IP needed? If it is needed and Beats are getting it in tricky ways, +1 to use the Downward API, but I think Said that, if Beats would collect the host information from files mounted from the host (procfs...), |
Anything that reduces the dependency on |
I'm primarily thinking of accessing kubelet's API at
Without
but it can reach the API if I use
to get the following:
So for this specific case we are fine to remove |
Oh ok, I was not thinking on this use case. Yes, for this it looks like a good idea to use the node ip. We would still need by now the node name and host network for other things.
+1 |
Investigating a bit on this one I have noticed the following.
|
Nice investigation! Commenting inline.
We own the manifests and if we don't have I'm not aware of system's module internals, maybe @fearful-symmetry can help here?
You are right, I double checked it and we can reach the kubelet's API using NODE_NAME even if we are not using hostNetwork. Not sure why it was not working in my previous comment and apologies for the confusion. Most probably I was confused with the usage of Example of NODE_NAME=gke-chrismark-elasticon-default-pool-d8304c2d-5eyc We changed that at #17469. Having said this, I guess that are good to stick with
We can expose the value to same env var or just tune the discovery code :).
cc-ing @exekias and @jmlrt since we had discussions around it in the past. For reference one issue with the usage of |
Some of the metricsets of system module like |
@ChrsMark |
When metricbeat or elastic-agent runs on kubernetes we propose in the manifests to mount This is due to the
Another problem of getting rid of that setting is My opinion is that we could get rid of hostNetwork from proposed manifests and add a note to the documentation of |
SGTM, maybe this network-related info could be obtained from the root filesystems, I remember some discussions about this.
I think that |
PR open for this elastic/elastic-package#502 |
@MichaelKatsoulis after recent findings I think we can conclude on keeping things as is? |
We have the problem discussed in elastic/integrations#2029 that by default, So we will keep it as is for now. |
So maybe we can close this one? |
Currently in Metricbeat's manifests we use
spec.nodeName
at https://github.com/elastic/beats/blob/master/deploy/kubernetes/metricbeat-kubernetes.yaml#L172 in combination withhostNetwork
to define the IP of k8s node running on. Most probably we could avoidhostNetwork
setting by leveragingstatus.hostIP
of Downward API.cc: @exekias @jsoriano
The text was updated successfully, but these errors were encountered: