简体   繁体   中英

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM