<p>Trying to set up MongoDB in a Kubernetes cluster on my local machine using Minikube but getting the following error. (I tried multiple MongoDB images; latest, 5.0.0, 4.0, etc. The problem continued.)</p>
<p>My <code>mongodb-secret.yaml</code> is as follows:</p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
  name: mongodb-secret
type: Opaque
data:
  mongo-root-username: dXNlcm5hbWUNCg==
  mongo-root-password: cGFzc3dvcmQNCg==
</code></pre>
<p>My <code>mongodb-deployment.yaml</code> file is as follows:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: mongodb-deployment
  labels:
    apps: mongodb
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mongodb
  template:
    metadata:
      labels:
        app: mongodb
    spec:
      containers:
      - name: mongodb
        image: mongo:latest
        ports:
        - containerPort: 27017
        env:
        - name: MONGO_INITDB_ROOT_USERNAME
          valueFrom:
            secretKeyRef:
              name: mongodb-secret
              key: mongo-root-username 
        - name: MONGO_INITDB_ROOT_PASSWORD
          valueFrom:
            secretKeyRef:
              name: mongodb-secret
              key: mongo-root-password
</code></pre>
<p>The output when I run <code>kubectl get all</code>:</p>
<pre><code>NAME                                      READY   STATUS             RESTARTS   AGE
pod/mongodb-deployment-6c587ddcbb-lnk2q   0/1     CrashLoopBackOff   6          7m56s

NAME                 TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
service/kubernetes   ClusterIP   10.96.0.1    &lt;none&gt;        443/TCP   6d

NAME                                 READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/mongodb-deployment   0/1     1            0           14m

NAME                                            DESIRED   CURRENT   READY   AGE
replicaset.apps/mongodb-deployment-59ff8f9fd7   0         0         0       9m1s
replicaset.apps/mongodb-deployment-6c587ddcbb   1         1         0       7m56s
replicaset.apps/mongodb-deployment-7fc5cbcf9c   0         0         0       10m
replicaset.apps/mongodb-deployment-8f6675bc5    0         0         0       14m
</code></pre>
<p>The output when I run <code>kubectl logs mongodb-deployment-6c587ddcbb-lnk2q</code>:</p>
<pre><code>about to fork child process, waiting until server is ready for connections.
forked process: 28

{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.738+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;CONTROL&quot;,  &quot;id&quot;:20698,   &quot;ctx&quot;:&quot;main&quot;,&quot;msg&quot;:&quot;***** SERVER RESTARTED *****&quot;}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.740+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;CONTROL&quot;,  &quot;id&quot;:23285,   &quot;ctx&quot;:&quot;main&quot;,&quot;msg&quot;:&quot;Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'&quot;}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.741+00:00&quot;},&quot;s&quot;:&quot;W&quot;,  &quot;c&quot;:&quot;ASIO&quot;,     &quot;id&quot;:22601,   &quot;ctx&quot;:&quot;main&quot;,&quot;msg&quot;:&quot;No TransportLayer configured during NetworkInterface startup&quot;}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.741+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;NETWORK&quot;,  &quot;id&quot;:4648601, &quot;ctx&quot;:&quot;main&quot;,&quot;msg&quot;:&quot;Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set tcpFastOpenServer, tcpFastOpenClient, and tcpFastOpenQueueSize.&quot;}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.741+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;STORAGE&quot;,  &quot;id&quot;:4615611, &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;MongoDB starting&quot;,&quot;attr&quot;:{&quot;pid&quot;:28,&quot;port&quot;:27017,&quot;dbPath&quot;:&quot;/data/db&quot;,&quot;architecture&quot;:&quot;64-bit&quot;,&quot;host&quot;:&quot;mongodb-deployment-6c587ddcbb-lnk2q&quot;}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.741+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;CONTROL&quot;,  &quot;id&quot;:23403,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;Build Info&quot;,&quot;attr&quot;:{&quot;buildInfo&quot;:{&quot;version&quot;:&quot;4.4.6&quot;,&quot;gitVersion&quot;:&quot;72e66213c2c3eab37d9358d5e78ad7f5c1d0d0d7&quot;,&quot;openSSLVersion&quot;:&quot;OpenSSL 1.1.1  11 Sep 2018&quot;,&quot;modules&quot;:[],&quot;allocator&quot;:&quot;tcmalloc&quot;,&quot;environment&quot;:{&quot;distmod&quot;:&quot;ubuntu1804&quot;,&quot;distarch&quot;:&quot;x86_64&quot;,&quot;target_arch&quot;:&quot;x86_64&quot;}}}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.741+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;CONTROL&quot;,  &quot;id&quot;:51765,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;Operating System&quot;,&quot;attr&quot;:{&quot;os&quot;:{&quot;name&quot;:&quot;Ubuntu&quot;,&quot;version&quot;:&quot;18.04&quot;}}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.741+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;CONTROL&quot;,  &quot;id&quot;:21951,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;Options set by command line&quot;,&quot;attr&quot;:{&quot;options&quot;:{&quot;net&quot;:{&quot;bindIp&quot;:&quot;127.0.0.1&quot;,&quot;port&quot;:27017,&quot;tls&quot;:{&quot;mode&quot;:&quot;disabled&quot;}},&quot;processManagement&quot;:{&quot;fork&quot;:true,&quot;pidFilePath&quot;:&quot;/tmp/docker-entrypoint-temp-mongod.pid&quot;},&quot;systemLog&quot;:{&quot;destination&quot;:&quot;file&quot;,&quot;logAppend&quot;:true,&quot;path&quot;:&quot;/proc/1/fd/1&quot;}}}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.741+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;STORAGE&quot;,  &quot;id&quot;:22297,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See http://dochub.mongodb.org/core/prodnotes-filesystem&quot;,&quot;tags&quot;:[&quot;startupWarnings&quot;]}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.742+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;STORAGE&quot;,  &quot;id&quot;:22315,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;Opening WiredTiger&quot;,&quot;attr&quot;:{&quot;config&quot;:&quot;create,cache_size=12285M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000,close_scan_interval=10,close_handle_minimum=250),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress,compact_progress],&quot;}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.855+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;STORAGE&quot;,  &quot;id&quot;:22430,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;WiredTiger message&quot;,&quot;attr&quot;:{&quot;message&quot;:&quot;[1623831333:855500][28:0x7f583f1b6ac0], txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] Set global recovery timestamp: (0, 0)&quot;}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.855+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;STORAGE&quot;,  &quot;id&quot;:22430,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;WiredTiger message&quot;,&quot;attr&quot;:{&quot;message&quot;:&quot;[1623831333:855566][28:0x7f583f1b6ac0], txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] Set global oldest timestamp: (0, 0)&quot;}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.865+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;STORAGE&quot;,  &quot;id&quot;:4795906, &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;WiredTiger opened&quot;,&quot;attr&quot;:{&quot;durationMillis&quot;:123}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.865+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;RECOVERY&quot;, &quot;id&quot;:23987,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;WiredTiger recoveryTimestamp&quot;,&quot;attr&quot;:{&quot;recoveryTimestamp&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:0,&quot;i&quot;:0}}}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.886+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;STORAGE&quot;,  &quot;id&quot;:4366408, &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;No table logging settings modifications are required for existing WiredTiger tables&quot;,&quot;attr&quot;:{&quot;loggingEnabled&quot;:true}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.887+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;STORAGE&quot;,  &quot;id&quot;:22262,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;Timestamp monitor starting&quot;}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.894+00:00&quot;},&quot;s&quot;:&quot;W&quot;,  &quot;c&quot;:&quot;CONTROL&quot;,  &quot;id&quot;:22120,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;Access control is not enabled for the database. Read and write access to data and configuration is unrestricted&quot;,&quot;tags&quot;:[&quot;startupWarnings&quot;]}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.894+00:00&quot;},&quot;s&quot;:&quot;W&quot;,  &quot;c&quot;:&quot;CONTROL&quot;,  &quot;id&quot;:22178,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;/sys/kernel/mm/transparent_hugepage/enabled is 'always'. We suggest setting it to 'never'&quot;,&quot;tags&quot;:[&quot;startupWarnings&quot;]}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.894+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;STORAGE&quot;,  &quot;id&quot;:20320,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;createCollection&quot;,&quot;attr&quot;:{&quot;namespace&quot;:&quot;admin.system.version&quot;,&quot;uuidDisposition&quot;:&quot;provided&quot;,&quot;uuid&quot;:{&quot;uuid&quot;:{&quot;$uuid&quot;:&quot;5118c0eb-1d88-4b4a-837c-ec78ce97b710&quot;}},&quot;options&quot;:{&quot;uuid&quot;:{&quot;$uuid&quot;:&quot;5118c0eb-1d88-4b4a-837c-ec78ce97b710&quot;}}}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.908+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;INDEX&quot;,    &quot;id&quot;:20345,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;Index build: done building&quot;,&quot;attr&quot;:{&quot;buildUUID&quot;:null,&quot;namespace&quot;:&quot;admin.system.version&quot;,&quot;index&quot;:&quot;_id_&quot;,&quot;commitTimestamp&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:0,&quot;i&quot;:0}}}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.908+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;COMMAND&quot;,  &quot;id&quot;:20459,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;Setting featureCompatibilityVersion&quot;,&quot;attr&quot;:{&quot;newVersion&quot;:&quot;4.4&quot;}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.908+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;STORAGE&quot;,  &quot;id&quot;:20536,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;Flow Control is enabled on this deployment&quot;}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.909+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;STORAGE&quot;,  &quot;id&quot;:20320,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;createCollection&quot;,&quot;attr&quot;:{&quot;namespace&quot;:&quot;local.startup_log&quot;,&quot;uuidDisposition&quot;:&quot;generated&quot;,&quot;uuid&quot;:{&quot;uuid&quot;:{&quot;$uuid&quot;:&quot;5e09a18c-0532-4fad-8981-283eb3f2f429&quot;}},&quot;options&quot;:{&quot;capped&quot;:true,&quot;size&quot;:10485760}}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.924+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;INDEX&quot;,    &quot;id&quot;:20345,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;Index build: done building&quot;,&quot;attr&quot;:{&quot;buildUUID&quot;:null,&quot;namespace&quot;:&quot;local.startup_log&quot;,&quot;index&quot;:&quot;_id_&quot;,&quot;commitTimestamp&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:0,&quot;i&quot;:0}}}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.924+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;FTDC&quot;,     &quot;id&quot;:20625,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;Initializing full-time diagnostic data capture&quot;,&quot;attr&quot;:{&quot;dataDirectory&quot;:&quot;/data/db/diagnostic.data&quot;}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.925+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;CONTROL&quot;,  &quot;id&quot;:20712,   &quot;ctx&quot;:&quot;LogicalSessionCacheReap&quot;,&quot;msg&quot;:&quot;Sessions collection is not set up; waiting until next sessions reap interval&quot;,&quot;attr&quot;:{&quot;error&quot;:&quot;NamespaceNotFound: config.system.sessions does not exist&quot;}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.925+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;STORAGE&quot;,  &quot;id&quot;:20320,   &quot;ctx&quot;:&quot;LogicalSessionCacheRefresh&quot;,&quot;msg&quot;:&quot;createCollection&quot;,&quot;attr&quot;:{&quot;namespace&quot;:&quot;config.system.sessions&quot;,&quot;uuidDisposition&quot;:&quot;generated&quot;,&quot;uuid&quot;:{&quot;uuid&quot;:{&quot;$uuid&quot;:&quot;8149a51f-47fd-4180-a6a4-310574dfae9b&quot;}},&quot;options&quot;:{}}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.925+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;NETWORK&quot;,  &quot;id&quot;:23015,   &quot;ctx&quot;:&quot;listener&quot;,&quot;msg&quot;:&quot;Listening on&quot;,&quot;attr&quot;:{&quot;address&quot;:&quot;/tmp/mongodb-27017.sock&quot;}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.926+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;NETWORK&quot;,  &quot;id&quot;:23015,   &quot;ctx&quot;:&quot;listener&quot;,&quot;msg&quot;:&quot;Listening on&quot;,&quot;attr&quot;:{&quot;address&quot;:&quot;127.0.0.1&quot;}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.926+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;NETWORK&quot;,  &quot;id&quot;:23016,   &quot;ctx&quot;:&quot;listener&quot;,&quot;msg&quot;:&quot;Waiting for connections&quot;,&quot;attr&quot;:{&quot;port&quot;:27017,&quot;ssl&quot;:&quot;off&quot;}}
child process started successfully, parent exiting
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.948+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;INDEX&quot;,    &quot;id&quot;:20345,   &quot;ctx&quot;:&quot;LogicalSessionCacheRefresh&quot;,&quot;msg&quot;:&quot;Index build: done building&quot;,&quot;attr&quot;:{&quot;buildUUID&quot;:null,&quot;namespace&quot;:&quot;config.system.sessions&quot;,&quot;index&quot;:&quot;_id_&quot;,&quot;commitTimestamp&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:0,&quot;i&quot;:0}}}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.948+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;INDEX&quot;,    &quot;id&quot;:20345,   &quot;ctx&quot;:&quot;LogicalSessionCacheRefresh&quot;,&quot;msg&quot;:&quot;Index build: done building&quot;,&quot;attr&quot;:{&quot;buildUUID&quot;:null,&quot;namespace&quot;:&quot;config.system.sessions&quot;,&quot;index&quot;:&quot;lsidTTLIndex&quot;,&quot;commitTimestamp&quot;:{&quot;$timestamp&quot;:{&quot;t&quot;:0,&quot;i&quot;:0}}}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.961+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;NETWORK&quot;,  &quot;id&quot;:22943,   &quot;ctx&quot;:&quot;listener&quot;,&quot;msg&quot;:&quot;Connection accepted&quot;,&quot;attr&quot;:{&quot;remote&quot;:&quot;127.0.0.1:55144&quot;,&quot;connectionId&quot;:1,&quot;connectionCount&quot;:1}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.961+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;NETWORK&quot;,  &quot;id&quot;:51800,   &quot;ctx&quot;:&quot;conn1&quot;,&quot;msg&quot;:&quot;client metadata&quot;,&quot;attr&quot;:{&quot;remote&quot;:&quot;127.0.0.1:55144&quot;,&quot;client&quot;:&quot;conn1&quot;,&quot;doc&quot;:{&quot;application&quot;:{&quot;name&quot;:&quot;MongoDB Shell&quot;},&quot;driver&quot;:{&quot;name&quot;:&quot;MongoDB Internal Client&quot;,&quot;version&quot;:&quot;4.4.6&quot;},&quot;os&quot;:{&quot;type&quot;:&quot;Linux&quot;,&quot;name&quot;:&quot;Ubuntu&quot;,&quot;architecture&quot;:&quot;x86_64&quot;,&quot;version&quot;:&quot;18.04&quot;}}}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:33.964+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;NETWORK&quot;,  &quot;id&quot;:22944,   &quot;ctx&quot;:&quot;conn1&quot;,&quot;msg&quot;:&quot;Connection ended&quot;,&quot;attr&quot;:{&quot;remote&quot;:&quot;127.0.0.1:55144&quot;,&quot;connectionId&quot;:1,&quot;connectionCount&quot;:0}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:34.003+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;NETWORK&quot;,  &quot;id&quot;:22943,   &quot;ctx&quot;:&quot;listener&quot;,&quot;msg&quot;:&quot;Connection accepted&quot;,&quot;attr&quot;:{&quot;remote&quot;:&quot;127.0.0.1:55146&quot;,&quot;connectionId&quot;:2,&quot;connectionCount&quot;:1}}
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:34.004+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;NETWORK&quot;,  &quot;id&quot;:51800,   &quot;ctx&quot;:&quot;conn2&quot;,&quot;msg&quot;:&quot;client metadata&quot;,&quot;attr&quot;:{&quot;remote&quot;:&quot;127.0.0.1:55146&quot;,&quot;client&quot;:&quot;conn2&quot;,&quot;doc&quot;:{&quot;application&quot;:{&quot;name&quot;:&quot;MongoDB Shell&quot;},&quot;driver&quot;:{&quot;name&quot;:&quot;MongoDB Internal Client&quot;,&quot;version&quot;:&quot;4.4.6&quot;},&quot;os&quot;:{&quot;type&quot;:&quot;Linux&quot;,&quot;name&quot;:&quot;Ubuntu&quot;,&quot;architecture&quot;:&quot;x86_64&quot;,&quot;version&quot;:&quot;18.04&quot;}}}}
uncaught exception: Error: couldn't add user: Error preflighting normalization: U_STRINGPREP_PROHIBITED_ERROR :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
DB.prototype.createUser@src/mongo/shell/db.js:1386:11
@(shell):1:1
Error saving history file: FileOpenFailed Unable to open() file /home/mongodb/.dbshell: No such file or directory
{&quot;t&quot;:{&quot;$date&quot;:&quot;2021-06-16T08:15:34.016+00:00&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;NETWORK&quot;,  &quot;id&quot;:22944,   &quot;ctx&quot;:&quot;conn2&quot;,&quot;msg&quot;:&quot;Connection ended&quot;,&quot;attr&quot;:{&quot;remote&quot;:&quot;127.0.0.1:55146&quot;,&quot;connectionId&quot;:2,&quot;connectionCount&quot;:0}}
</code></pre>
<p>What am I missing?</p>

Mert Ozturk
<p>Checking your secret values, something's wrong:</p>
<pre><code>$ echo  dXNlcm5hbWUNCg==| base64 --decode | cat -e
username^M$
$ echo  cGFzc3dvcmQNCg== | base64 --decode | cat -e
password^M$
</code></pre>
<p>Try re-creating your secret without those un-printable characters (<code>\r</code> as well as <code>\n</code>).</p>
<p>Maybe, instead of pre-encoding your secret, you could try:</p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
  name: mongodb-secret
type: Opaque
stringData:
  mongo-root-username: username
  mongo-root-password: password
</code></pre>
