Skip to main content

Your submission was sent successfully! Close

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates from Canonical and upcoming events where you can meet our team.Close

Thank you for contacting us. A member of our team will be in touch shortly. Close

A complete, detailed tutorial about deploying and operating a sharded cluster on MongoDB K8s is currently under construction. Thank you for your patience!

In the meantime, you can:


Deploy a sharded cluster

Here are all the steps you need to learn how to deploy and operate a sharded cluster on MongoDB K8s, including setting up and tearing down a test environment.

1. Set up your environment

See: Tutorial > Deploy a replica set > 1. Set up your environment

The environment setup process (Juju, MicroK8s) is independent of the deployment type (replica set or sharded cluster).

2. Deploy MongoDB

See: How to > Deploy MongoDB > Create a MongoDB sharded cluster

3. Access a sharded cluster

To deploy, integrate, and retrieve the URI, see: Mongos K8s documentation > Get started (external page)

To access the mongo shell and create a test database, see Tutorial > Deploy a replica set > 3. Access a replica set

Keep in mind that for a sharded cluster, you must ssh into the config-server unit instead of mongodb-k8s.

4. Add and remove shards

See: How to > Scale replicas and shards > Scale a sharded cluster

5. Manage passwords

See: How to > Manage client connections > Rotate mongos password

6. Integrate with other applications

See: How to > Manage client connections > Create a client connection to a sharded cluster

7. Enable TLS

See: How to > Enable TLS encryption > Enable and disable TLS in a sharded cluster

8. Clean up your environment

See: Tutorial > Deploy a replica set > 8. Clean up your environment

The environment cleanup process is independent of the deployment type (replica set or sharded cluster).

Last updated a month ago. Help improve this document in the forum.