I have the same issue when i tried to deploy config server cluster with kubernetes on azure. I setup environment variables: MONGO_INITDB_ROOT_USERNAME and MONGO_INITDB_ROOT_PASSWORD. And the args list is: args: [“–keyFile”, “/mongodb/replicaset.key”, “–configsvr”, “–replSet”, “rs0”, “–dbpath”, “/data/configdb”]. But deployment failed with such error:
BadValue: Cannot start a configsvr as a standalone server. Please use the option --replSet to start the node as a replica set.
try ‘mongod --help’ for more information