0

I'm trying to achieve rootless PHP-FPM pod running in Kubernetes.

I tried simply running process in Kubernetes pod via init script that does php-fpm -FO as www-data user but it complaints about not having permissions to access /dev/stderr (log output location). Adding www-data user to the tty group also didn't help.

I tried specifying another location like /proc/self/fd/2 and even /dev/pts/1 as log location but to no avail.

Funny thing is, when I run docker run -itd app:latest su -l www-data -s /bin/sh -c php-fpm -FO &, basically the same startup command via Docker directly, it starts and works just fine.

I don't have any securityContext configured in Kubernetes that could affect process from starting normally.

Any suggestions/ideas to try?

2
  • Can you share more details? Which node OS and container image are you using?
    – Sergiusz
    Sep 27, 2021 at 13:57
  • @Sergiusz I use GKE and their cOS OS and php:fpm-alpine image.
    – dzhi
    Sep 27, 2021 at 15:21

1 Answer 1

0

If you experience the same error on different public apps, it may indicate an issue with GKE. You can report it via Issue Tracker.
If this error is specific to this app, consider different logging aggregator, for example the sidecar pattern.
There's more information regarding logging on GKE in this document.
Additionally, if you are using cOS with Docker, you should switch to containerd version because the former has been deprecated.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .