Connecting the Database Server to the Cluster¶
After initializing the database cluster on the replica set primary, add the other members of the replica set.
Caution - replica set primary only
Perform the following configuration step on the replica set primary.-
Add
<server_2>
to the cluster:sudo mongo --tls --tlsAllowInvalidCertificates --eval "rs.add('<server_2>')"
The output has to contain the following line::
"ok" : 1
-
Add
<server_3>
to the cluster:sudo mongo --tls --tlsAllowInvalidCertificates --eval "rs.add('<server_3>')"
The output has to contain the following line::
"ok" : 1
-
Proceed until all servers are added.
Proceed with Securing MongoDB: TLS encryption or user authentication.