<p>I created a cluster in google cloud, deployed mongodb using help:</p>
<pre><code>helm install my-release \
    --set auth.rootPassword=password,auth.databases[0]=&quot;database&quot;,auth.usernames[0]=&quot;root&quot;,architecture=replicaset,auth.replicaSetKey=&quot;keykfjhewq&quot;,auth.enabled=true \
    bitnami/mongodb
</code></pre>
<p>All is up, but when I exec into the pods and do <code>rs.status()</code> I get:</p>
<pre><code>{
    &quot;ok&quot; : 0,
    &quot;errmsg&quot; : &quot;command replSetGetStatus requires authentication&quot;,
    &quot;code&quot; : 13,
    &quot;codeName&quot; : &quot;Unauthorized&quot;,
    &quot;$clusterTime&quot; : {
        &quot;clusterTime&quot; : Timestamp(1653254244, 1),
        &quot;signature&quot; : {
            &quot;hash&quot; : BinData(0,&quot;EZ4IdSOklvKSvSmWVYU6Rr/VcaM=&quot;),
            &quot;keyId&quot; : NumberLong(&quot;7100667090272518150&quot;)
        }
    },
    &quot;operationTime&quot; : Timestamp(1653254244, 1)
}

</code></pre>
<p>What am I doing wrong?</p>

pizza_pasta
<p>This error is stating that everything is running correctly, however in order to access the replica sets you need to first authenticate (you told it to use auth in your <code>--set</code> values with <code>auth.enabled=true</code>). To authenticate you need to tell mongo to use admin privileges and log in with the username and password you set up:</p>
<pre class="lang-sh prettyprint-override"><code>use admin
db.auth(username, password)
</code></pre>
<p>This will get you authenticated and allowed to use the shell.</p>
