HI all
Need some help ! I am trying to install Mongodb on aws nodes (its a 4 node cluster Rhel 8.5 OS) Using K8s 1.23 Installing Mongodb is faling.
helm repo add bitnami from charts bitnami
helm install my-release bitnami/mongodb-sharded --namespace=mongodb --set global.storageClass=vxflexos-xfs --set mongodbRootPassword=mongodb123,mongodbUsername=mongodb,mongodbPassword=mongodb123,mongodbDatabase=ycsb --set volumePermissions.enabled=true --set replicaSet.enabled=true --set shards=2 --set configsvr.replicas=1 --set configsvr.persistence.size=100Gi --set mongos.replicas=1 --set shardsvr.dataNode.replicas=1 --set shardsvr.persistence.size=500Gi --set shardsvr.dataNode.resources.requests.memory=64Gi --set shardsvr.dataNode.resources.requests.cpu=16 --set configsvr.resources.requests.memory=16Gi --set mongos.resources.requests.memory=16Gi
Using this command however Kubectl logs says the following :
[root@Mongo-K8Master ec2-user]# kubectl logs -n mongodb my-release-mongodb-sharded-shard1-data-0
13:22:29.35 INFO ==> Setting node as primary
mongodb 13:22:29.38
mongodb 13:22:29.38 Welcome to the Bitnami mongodb-sharded container
mongodb 13:22:29.38 Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-mongodb-sharded
mongodb 13:22:29.38 Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-mongodb-sharded/issues
mongodb 13:22:29.38
mongodb 13:22:29.38 INFO ==> ** Starting MongoDB Sharded setup **
mongodb 13:22:29.42 INFO ==> Validating settings in MONGODB_* env varsâŠ
mkdir: cannot create directory â/bitnami/mongodbâ: Permission denied
- If i try to use chown permissions to /bitmani/mongodb-- it says directory doesnât exist
- I tried using --set volumePermissions.enabled=true option but no luck
I also tried without --set volumePermissions.enabled=true option in this case I am able to make the pods run fine but after i exec to pods I am not able to login to database it gives authentication error
[root@Mongo-K8Master mongobackup]# kubectl exec my-release-mongodb-sharded-shard0-data-0 -n mongodb -it â bash
Defaulted container âmongodbâ out of: mongodb, volume-permissions (init)
I have no name!@my-release-mongodb-sharded-shard0-data-0:/$
I have no name!@my-release-mongodb-sharded-shard0-data-0:/$ mongo admin --username root -p mongodb123 --host 10.244.3.36 --port 27017
MongoDB shell version v5.0.8
connecting to: mongodb://10.244.3.36:27017/admin?compressors=disabled&gssapiServiceName=mongodb
Error: couldnât connect to server 10.244.3.36:27017, connection attempt failed: SocketException: Error connecting to 10.244.3.36:27017 :: caused by :: Connection refused :
connect@src/mongo/shell/mongo.js:372:17
@(connect):2:6
exception: connect failed
exiting with code 1
I have no name!@my-release-mongodb-sharded-shard0-data-0:/$
Please help me overcome this