<p>I'm following this tutorial for deploying pgAdmin in a kubernetes cluster:
<a href="https://www.enterprisedb.com/blog/how-deploy-pgadmin-kubernetes" rel="nofollow noreferrer">https://www.enterprisedb.com/blog/how-deploy-pgadmin-kubernetes</a></p>
<p>Mostly it works, but I get erros about the acl permissions of the volume:</p>
<pre><code>WARNING: Failed to set ACL on the directory containing the configuration database:
[Errno 1] Operation not permitted: '/var/lib/pgadmin'
HINT   : You may need to manually set the permissions on
         /var/lib/pgadmin to allow pgadmin to write to it.
</code></pre>
<p>Since I saw some similar errors before I adjusted in the statefulset the securityContext to:</p>
<pre><code>   spec:
     securityContext:
      runAsUser: 5050
      runAsGroup: 5050
      fsGroup: 5050
     containers:
       ...
</code></pre>
<p>Some of the issues are gone through this, but not the one above. In the pgAdmin docs I can only find how to solve this by using <code>chmod</code> on the folder, but I want these permissions in the yml files for stable deployment.</p>
<p>How can I do this in my configuration files?</p>

Heikkisorsa
<p>In a kubernetes cluster the tutorial seems to have multiple flaws: The ACL permissions can fail, which can be dealt with an initContainer, and the namespaces must fit. Afterwards, it works like a charm.</p>
