-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Run Ngninx Kubernetes Ingress controller with readOnlyRootFilesystem: true
#1677
Comments
Hi @abhisek-dwivedi thanks for reporting! Be sure to check out the docs while you wait for a human to take a look at this 🙂 Cheers! |
We haven't tested if it's possible to run an IC pod with Note that in addition to
|
Okay, thanks. Would it be possible to merge all these folders to just one common folder by setting some variable in code and mounting that path as an emptyDir volume externally? Not sure if that's going to work. Let me know your thoughts. Thanks |
Hello @abhisek-dwivedi I am really trying to fully understand what you are trying to accomplish as opposed to focusing on one solution that you are asking about. As there are other possible approaches. |
Yeah totally agree that there are other possible good approaches. I was just playing around with IC to make it work as per my use case. I have a product that runs along with IC, so you can say there is a hard dependency on it. But now the problem is that my product runs with minimum Pod Security permission without Also, normal helm chart test/linter tools flag these kinds of permission as well. FYI: I am able to get pass-through root user and |
Note about To allow NGINX to bind to privileged ports like 80 and 443, we add the IC process (
NGINX master process (
|
I also want to have the nginx-controller container work with a readOnlyFilesysstem. My quick-and-dirty solution is
My entrypoint (make it executable):
My Dockerfile
Kubernetes adjustments:
Doing it like this you can also run this container the old way. |
Comment added by Brian Ehlert in Aha! - View |
I am proposing a PR to configure a readonly rootfs. However this feature request sneaks in a second item: NB! Moved to #3544 (comment). |
Lets separate the concerns of readOnlyRoot from allowPrivelegeEscalation We have another submitter that is looking at privilege escalation. #3544 And we also have another capability in the works to make defining listeners on additional ports much easier, specifically for HTTP/S that will mesh nicely with that. |
Is your feature request related to a problem? Please describe.
Users should be able to run nginx Kubernetes ingress controller with minimum permissions in the security context. Current configuration runs with
AllowPrivilegeEscalation: true
andreadOnlyRootFilesystem: false
but there should be a way to restrict the permissions to a bare minimum.Describe the solution you'd like
I was able to remove
AllowPrivilegeEscalation: true
by changing the hard code privileged ports (80, 443) in code & templates and building a custom docker image out of it. But for thereadOnlyRootFilesystem: false
workaround I'm trying to change/etc/nginx
directory where all configurations are stored/created to one emptyDir volume.But after these changes, I'm facing sock connection failure and other issues in IC pod.
Eg:
F0616 14:26:09.191702 1 manager.go:284] Could not get newest config version: could not get expected version: 0 after 4s
Is it possible to run IC with
readOnlyRootFilesystem: true
? or some specific steps are required to do so ?Aha! Link: https://nginx.aha.io/features/IC-97
The text was updated successfully, but these errors were encountered: