Hi,
What should be the connection URI to connect to replica set through primary?
I’m getting this issue Failed: db.collection: error creating collection db.coleection: error running create command: (NotWritablePrimary) not primary
Services list in my Percona cluster:
- psmdb-db-rs0
- psmdb-db-rs0-0
- psmdb-db-rs0-1
- psmdb-db-rs0-2
- psmdb-db-rs0-3
- psmdb-db-rs0-arbiter-0
Connection string used:
mongodb://$BACKUP-ADMIN:$MONGODB_BACKUP_PASSWORD@psmdb-db-rs0.percona-dbs.svc.cluster.local:27017/database?authSource=admin