使用Helm在Kubernetes安装Mongodb

使用Helm在Kubernetes安装Mongodb,mongodb,docker,kubernetes,kubernetes-helm,Mongodb,Docker,Kubernetes,Kubernetes Helm,我在Kubernetes集群中使用Helm安装了mongodb。 它工作正常,让我连接到数据库。但一旦我登录到mongo服务器,我就无法执行任何操作。这是我在尝试查看集合时遇到的错误 > show collections; 2018-04-19T18:03:59.818+0000 E QUERY [js] Error: listCollections failed: { "ok" : 0, "errmsg" : "not authorized on test

我在Kubernetes集群中使用Helm安装了mongodb。

它工作正常,让我连接到数据库。但一旦我登录到mongo服务器,我就无法执行任何操作。这是我在尝试查看集合时遇到的错误

    > show collections;
2018-04-19T18:03:59.818+0000 E QUERY    [js] Error: listCollections failed: {
    "ok" : 0,
    "errmsg" : "not authorized on test to execute command { listCollections: 1.0, filter: {}, $db: \"test\" }",
    "code" : 13,
    "codeName" : "Unauthorized"
} :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
DB.prototype._getCollectionInfosCommand@src/mongo/shell/db.js:942:1
DB.prototype.getCollectionInfos@src/mongo/shell/db.js:954:19
DB.prototype.getCollectionNames@src/mongo/shell/db.js:965:16
shellHelper.show@src/mongo/shell/utils.js:836:9
shellHelper@src/mongo/shell/utils.js:733:15
@(shellhelp2):1:1
我以root用户身份登录,使用

mongo -p password

我不知道为什么连root用户都没有权限做任何事情。

我发现了这个问题。默认情况下,MongoDB使用admin DB进行身份验证,但在helm图表中,身份验证DB与使用它创建的DB相同。因此,如果我创建一个名为test的数据库,身份验证数据库也将是test

您使用哪些参数来安装helm图表?此处相同。。。上次我这么做的时候没有这个问题。不知道目前发生了什么。