<p>I'm trying to install mongodb and set the root password</p>
<p>I've tried this:</p>
<pre><code>helm install mongo bitnami/mongodb --set mongodbRootPassword=admin123
</code></pre>
<p>and this:</p>
<pre><code>helm install mongo bitnami/mongodb -f mongo-values.yaml
</code></pre>
<p>while this is my values:</p>
<pre><code># cat mongo-values.yaml
mongodbRootPassword: admin123
</code></pre>
<p>But it looks like <code>mongodbRootPassword</code> is ignored in both cases. this is how i try to get my root password:</p>
<pre><code># kubectl get secret --namespace default mongo-mongodb -o jsonpath=&quot;{.data.mongodb-root-password}&quot; | base64 --decode
TK0iwk8lue
</code></pre>

Moshe Shaham
<p>From the <a href="https://hub.helm.sh/charts/bitnami/mongodb" rel="nofollow noreferrer">docs</a> use <code>auth.rootPassword</code> instead of <code>mongodbRootPassword</code>. <code>mongodbRootPassword</code> is for mongodb from stable chart and not for mongodb from bitnami</p>
<pre><code>helm install my-release \
--set auth.rootPassword=secretpassword,auth.username=my-user,auth.password=my-password,auth.database=my-database \
bitnami/mongodb
</code></pre>
<p>The above command sets the MongoDB root account password to <code>secretpassword</code>. Additionally, it creates a standard database user named <code>my-user</code>, with the password <code>my-password</code>, who has access to a database named <code>my-database</code></p>
