Run as non root user in Kubernetes
When Pod Security Police setted to restricted, all pods run as non-root user
So we got a permissions error
mkdir: can't create directory '/root/.ssh': Permission denied
/start.sh: line 7: /root/.ssh/config: Permission denied
/start.sh: line 8: /root/.ssh/config: Permission denied
/start.sh: line 101: /usr/local/etc/php-fpm.d/www.conf: Permission denied
sed: can't create temp file '/usr/local/etc/php-fpm.confXXXXXX': Permission denied
cat: can't open '/etc/TZ': No such file or directory
/start.sh: line 133: /usr/local/etc/php/conf.d/timezone.ini: Permission denied
chown: /var/www/html: Operation not permitted
Error: Can't drop privilege as nonroot user
For help, use /usr/bin/supervisord -h
Do you have any solution?