-
Notifications
You must be signed in to change notification settings - Fork 1.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
Does privileged container supported? #4130
Comments
after apply below config, it works in 0.5.2.
However on 0.6 , i still get |
|
@dgerd Can you verify if |
If you are referring to I have created an issue here ( #4190 ) for that, and hope to have a discussion about it at an upcoming API Working Group meeting. There are clearly many good use-cases for the downward API, but we need to figure out the best way to add this back. |
I would like to discuss this (priviledged support) in the next API Working group meeting. It is 10:30am-11:00am Pacific on Wednesday 6/12. @cometta if you are able to attend and talk more about your use-case that would be awesome. If the date doesn't work for you and you would like to attend we can bump to a future WG meeting. |
Adding some content here prior to today's discussion in the working group. Where I currently stand on this is that I believe we should keep privileged support disabled in Knative. The strongest concerns I have for enabling this feature is that:
Concerns aside I do want to look at this from a use-case enabling perspective. A lot has happened since Kubernetes added the privileged flag in 2014. I managed to find the original issue adding the privileged flag ( kubernetes/kubernetes#391 ) as I was curious as to the use-case discussion back then and if it is still relevant. Looking through the comments the core use-case that seemed to drive support for privileged back then was doing on-cluster Docker builds which had no good workarounds. Since this point in time there has been an increase in tooling to do rootless builds such as Kaniko ( https://github.com/GoogleContainerTools/kaniko ). Looking at the specific issue here of FUSE volume support, the addition of volume drivers into Docker and the CSI interface into Kubernetes has enabled API supported ways to mount custom volumes into containers without the need for privileged. Azure looks to offer a FUSE Flex Volume driver for this use-case today (note: I have not tried this): https://github.com/Azure/kubernetes-volume-drivers/tree/master/flexvolume/blobfuse. While mounting volumes into the container will likely slow down container creation and add to cold-start latency it has much lower impact to Knative operating correctly and improved security over privileged. This ends up looking like this in the PodSpec (taken from example in the documentation):
We don't currently allow non-configmap/secret volumes to be attached to Knative due to state persistence and scaling concerns, but volumes types that inherently support multiple readers/writers seem worthwhile to look into. This still has some concerns with portability across Knative installs, but an error can be exposed much earlier in the lifecycle as the request for the volume is now structured. |
@dgerd a lot of your concerns seem more focused on Kube's use of privileged containers rather than Knative directly. I tend to look at Knative (first) as a nicer UX for Kube and as such unless there's a specific Kn-specific technical reason for why we can't expose some Kube features via Knative, I think we should. I do think making Kn's UX ugly is a good reason, but I don't think this one attribute does that when it's already part of the PodSpec. I'd like to try to get as many workloads from Kube to run on Kn as possible. And +1 to generic PV support :-) |
Since @dgerd asked on today's call I just got this feedback w.r.t. using privileged containers: We're using them in order to allow us to generate core dumps for some Java workloads we’re deploying to our clusters… We’re using a daemon set to apply |
Also, I misspoke on the call today, we DO allow privileged containers on our cloud - learn something new every day :-) |
Couple more uses:
|
As discussed in the API WG last week I am going to close this issue as we do not plan to allow privileged containers in Knative at this time. The pattern that we would like to take is to instead enable particular use-cases through more well-formed API semantics. For this particular use case we should explore relaxing volume restrictions to allow volumes types that are known to work and scale well (multi-read-write or multi-reader read-only). See #4417. @duglin Thanks for the examples of other use-cases here. I don't see the two daemon sets being particularly valuable workloads in Knative given their host-centric nature. I am not sure I understand the Spectrum Protect workload. If this is something you believe can and should be able to be ran on Knative can you open an issue? |
My service.yaml look like below
I able to apply this yaml file successfully. However, when i try to mount using blobfuse for azure files, it just hangs. I able to run blobfuse using privileged on a docker on my development machine.
The text was updated successfully, but these errors were encountered: