systemd is not working when running container as non root user

  Kiến thức lập trình

I’m trying to run a container in a unprivileged pod deployed in openshift cluster. And I’ve couple of custom systemd services in container in which I’m setting some environment like starting API server etc for my application

Here, systemd services are running as expected when I did run the pod as root user

Doing below in my statefulset -> security Context:
runAsUser:0
runAsNonRoot:false

But the are not running when I run the pod as non root user.

runAsUser: 10599
runAsNonRoot: true

When I check the running process inside pod, systemd-journald is also not running.

When I run systemctl it is erroring as D-bus is not available

By the way, there is no issue with my systemd services. I’m able to run them as non root user in container. But the problem is systemd itself is not working when I run container as non root user

I want to run systemd services in my pod which is running as non root user

New contributor

Raviteja Lanka is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT