Skip to content

Commit

Permalink
Added external connection instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
a-velasco authored Oct 21, 2024
1 parent 09d780e commit 9dbf646
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,29 @@ juju integrate mongos-k8s <tls-application>
```
> For more information about TLS in sharded clusters, see the Charmed MongoDB documentation for [enabling security in sharded clusters](https://charmhub.io/mongodb/docs/t-enable-tls-sharding)
### External connections

If you would like to connect the sharded MongoDB K8s cluster *outside* of Juju, this is possible with the configuration `expose-external` in the mongos-k8s charm.

Simply configure the charm to use `nodeport`:
```shell
juju config mongos-k8s expose-external=nodeport
```

This will make the mongos router accessible outside of Juju and will provide you access to the cluster. You will now see that all of your client URIs have been updated.

For example run:
```
juju run data-integrator get-credentials
```

You will see that the URI has changed.

To reconfigure the charm to have internal access only, run:
```shell
juju config mongos-k8s expose-external=none
```

### Remove `mongos`
To remove a `mongos` connection to the sharded cluster, run:
```none
Expand Down

0 comments on commit 9dbf646

Please sign in to comment.