Permission denied while deploying/activating docker image in Rancher-Kubernetes

9/12/2018

I'm deploying the hyperledger/fabric-couchdb docker image on Rancher-Kubernetes. In the cluster, it's not allowed run container as ROOT. So we need select as Nonroot while deploying images.

After deploying hyperledger/fabric-couchdb, the pod is not getting started. When I checked logs, the message is su-exec: setgroups: Operation not permitted. In the below image, I have attached a screenshot from Event as well. Please suggest what needs to done to make it work or am I doing something wrong here.

Event screenshot

-- Vikas Banage
docker
hyperledger
hyperledger-fabric
kubernetes
rancher

1 Answer

9/12/2018

That's the problem, you are not running as 'root' and the container entrypoint executes a call to setgroups which requires 'root'. You will have to either run as 'root' somehow or you can modify your container image and the entrypoint to perhaps make those calls where 'root' is require using something like 'sudo'.

Note that whatever user call 'sudo' needs to have 'root' like permissions to execute setgroups

-- Rico
Source: StackOverflow