When starting, postgres will try to make sure there are sensible permissions on its database storage directory. If not running as root with the path /var/lib/postgresql/data provided by kubernetes, it will likely fail.
This can typically be solved by having an initContainer creating the directory used for data in a volume provided for it.
pontus@164c2f1 show an example of how this can be done.