<p>For our Database we have opted for self deployed mongodb and configured it as a service over GKE's managed mongoDB Atlas database. 
however, how to enable authentication as we do in classical deployment? to make use of user authentication. </p>

<p>neither we are able to login to the official mongo image, nor use editor to set the Authentication Flag to <strong>True</strong></p>

<p>Tried copying the mongoDB config file to local machine to make required changes and replacing it in the image back again, <code>kubectl copy</code> require tar archive utility which mongo official image doesn't have. </p>

cross_handle
<p>We can use kubernetes provided args flag to start mongo server with authentication enabled, so user based authentication can be utilised for restricting the access to DB.</p>

<p>in MongoDB Deployment manifest just pass <strong>"--auth"</strong></p>

<pre><code>      containers:
      - name: mongo
        image: mongo
        args: ["--auth"]
</code></pre>

<p>as usual access the db using connection string:
<code>mongodb://USR:PWD@IP:PORT</code></p>

<p>from Robo 3t put load balancer service IP and mongo standard port: 27017</p>
