I have a docker container which runs perfectly fine in a kubernetes pod when
privileged:true is set in the specification. But when I run the same docker container, by giving all the linux capabilities, it is failing. In both cases the capability bitmask for the processes are same and as follows:
SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000010000 SigIgn: 0000000000000004 SigCgt: 0000000000014002 CapInh: 0000003fffffffff CapPrm: 0000003fffffffff CapEff: 0000003fffffffff CapBnd: 0000003fffffffff CapAmb: 0000000000000000
So, is there any difference between Running a process as root vs Running a process with all the capabilities.
Update : As pointed out by @ctrl-alt-delor, Setting
privilege:true means that the container will have access to all devices on the host as well as same access to the host as processes running outside containers on the host