Skip to content
Discussion options

You must be logged in to vote

Good question! In Kubernetes, setting privileged: true in the securityContext gives the container almost all the capabilities of the host, effectively bypassing most security restrictions.

On the other hand, capabilities.drop: ALL attempts to drop all Linux capabilities from the container.

However, when privileged: true is set, the container runs with elevated privileges, and dropping capabilities generally has no effect because privileged mode overrides capability restrictions.

So, using capabilities.drop: ALL together with privileged: true does not make much sense, as the privileged flag grants all capabilities regardless of what you try to drop.

If your goal is to restrict capabilities…

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by Ais8Ooz8
Comment options

You must be logged in to vote
1 reply
@andyzhangx
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants