-
Notifications
You must be signed in to change notification settings - Fork 712
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
Potentially chown Elastic Agent hostpath data directory #6239
Comments
After discussion, we've decided to take the approach of using an init container to make this user experience better. Since the gid in openshift is known, we'll take this approach:
|
Also related: #6280 |
Hi @naemono I followed the official eck k8s 2.6 documentation and created the required resources. Worth mentioning is that we implemented the compliance operator and have used the CIS operator to hardening the platform.
Rolebinding
The hostpath is created on the physical machine but we are still getting permissions denied!
|
@gittihub123 I'll investigate this and get back to you. |
@gittihub123 The below appears to be required in the case of openshift:
|
Hi @naemono The same applies when I try to create a standalone filebeat instance with this configuration.
Error message
|
@gittihub123 Running Agent and/or Beat in an openshift environment has many more complexities than running in a standard Kubernetes environment. We document these issues here. We also have some beats recipes that we use in our e2e tests that we run on a regular basis here. I just successfully deployed this beat recipe on an openshift 4.9 cluster, following our documentation noted above, specifically:
Then applied this manifest, which worked after a bit of time (beat pods crash once or twice while users/api keys are being propagated throughout the Elastic stack)
Note the difference in the
|
Hi @naemono So far, the elastic-agent is running and is managed by fleet but it's only collecting logs from Openshift (logs/metrics). The elastic stack is running in the same namespaces and I have connection between all pods (Elasticsearch, kibana, fleet & elastic-agent). This is my configuration
I believe the network flow would be something like this right? Syslog source (ciscoFTD, palo alto etc) -> Openshift route (for example ciscoftd.dev.test.com) -> elastic agent SVC (created by me to expose the elastic agents) -> elastic-agent pods. This should be possible or should we try to do it another way? Thanks. |
This solution makes sense to me using a custom tcp agent integration... |
the solution will not work if you use a keystore ! Because operator append an initContainer before the permissions container .... |
There have been a number of issues/PRs concerning this issue: #5993, #6147, #6205, #6193.
The following is required when running Elastic Agent with a
hostPath
:If not, you get this error:
An
initContainer
that does the following allows Elastic Agent to work properly without The Agent Itself usingrunAsUser: 0
This is more complicated in a situation such as openshift where UIDs are randomized, but likely doable.
So the question is, do we pursue this path to make the UX for Elastic Agent more consistent between empty
emptyDir
, andhostPath
?Security Note
runAsUser: 0
.The text was updated successfully, but these errors were encountered: