<p>I want to change my Postgres database username and password for the running pod.</p>
<p>I am able to change the password but how to change the username?</p>

devcloud
<p>Connect to the pod:</p>
<pre class="lang-sh prettyprint-override"><code>kubectl exec -it &lt;pod-name&gt; bash
</code></pre>
<p>Run psql</p>
<pre><code># psql
psql&gt;
</code></pre>
<p>Create the user:</p>
<pre class="lang-sql prettyprint-override"><code>CREATE USER name CREATEUSER;
ALTER USER name WITH PASSWORD 'your-password';
</code></pre>
<p>or simply run <a href="https://www.postgresql.org/docs/8.0/app-createuser.html" rel="nofollow noreferrer"><code>createuser</code></a> from the pod:</p>
<pre><code># createuser --aduser name
</code></pre>
