api-ui-data

Managing databases at scale can be a daunting task for administrators. By using the Kubernetes platform to provide standardization across on-premises and hybrid clouds, Portworx Data Services can make managing databases at scale much simpler. In this blog post, we’ll discuss how to manage our latest data service, MongoDB Enterprise, through Portworx Data Services.

MongoDB is a very popular solution for developers looking for a document database. Storing data in a NoSQL database like MongoDB gives developers flexibility when doing data transformations within their apps, and developers can have the freedom to modify the schema in a very straightforward way. MongoDB is also a great choice to run on Kubernetes because of the scale-out nature of the database. Kubernetes can quickly add more replicas based on an immutable image, and MongoDB is built from the ground up with a scale-out architecture to increase data availability and performance.

Simplify Deployment with Portworx Data Services

Portworx Data Services (PDS) is the one-stop solution for DevOps or Platform Engineering teams to deploy data services on Kubernetes. You can use the PDS self-service portal to quickly deploy customized databases to any conformant Kubernetes clusters in your environment. By leveraging Kubernetes as an application platform to run your databases, you can keep the same operating model between your on-premises Kubernetes clusters running on RedHat OpenShift and your Amazon EKS clusters running in the cloud, making operational tasks less complex. There is no need to configure your MongoDB databases through different tools just because they live in different cloud environments.

screen1 mongodb

Deploy MongoDB on Kubernetes with Portworx Data Services

Before you deploy your MongoDB instance, you should have a MongoDB Enterprise license. The version of MongoDB provided by Portworx Data Services is Enterprise, which, of course, requires a license to use. Once you’ve procured your license, you can use the PDS self-service portal to deploy your database to your target cluster.

screen2 mongodbOK

A deployment task will require several pieces of information about your MongoDB database. The first piece of information is what version of MongoDB you would like to deploy. Currently, PDS maintains support for MongoDB 6.0.2 and later.

Choose which Kubernetes cluster you want your database to be deployed to. You’ll quickly see that the process for deploying these services on multiple cloud providers or locations will be the same across platforms, which will limit the operational complexities of running multiple environments. Users can also choose to deploy load balancers for the deployment in case you want to make your database available from outside the Kubernetes cluster.

When it comes to sizing the deployment, users have even more options during and after deployment. PDS provides database templates for Administrators to manage resource requests and limits. Here, you can specify your CPU, memory, and storage requirements for your MongoDB nodes before they’re deployed. Using these resource settings, Administrators can limit what access the self-service users can request for their workloads.

screen3 mongodb

In addition to resource settings, you’ll specify a number of nodes in which to deploy. A single MongoDB database might be OK for your application with proper backups, but, in many cases, secondary nodes are needed to provide high availability or performance. Portworx Data Services can deploy your MongoDB database as a replica set with synchronous replication to meet your availability and performance requirements.

Next, you’ll need to decide which storage class you want your MongoDB database to use for persistent storage. The storage classes provided by Portworx Enterprise allow you to specify things like a replication factor, where you can define how many redundant copies of data will exist, and the I/O profile, where you can specify the types of reads/writes expected for your data.

Finally, you can create a backup schedule so that your MongoDB database will get an application consistent backup on a schedule that you define. This ensures that users deploying their own data services also get proper backups of that data at predefined intervals.

As your database is being deployed, you can review any of the events occurring while the services are being started on your Kubernetes clusters. When the deployment has finished, you can then grab your connection strings to access your MongoDB replica set. To do this, users can use the self-service portal to retrieve the connection information about your MongoDB replica sets. The connection info screen displays the database endpoints, port, username, and the password for your deployed database instance. This information is available via the GUI and, of course, through our application programming interface (API).

screen4 mongodb

MongoDB Day 2 Operations

The deployment is only a part of the work needed to manage an enterprise database. The real work often starts after the database has been deployed. As you start using the database, additional tasks might come up, such as lifecycle management activities of the database cluster.

Platform Engineers may need to upgrade the MongoDB instance to add new features or to patch newly discovered security vulnerabilities. With Portworx Data Services, you can easily change the version, which will perform a non-disruptive, rolling upgrade of your MongoDB instance. As a routine precaution, you can also take a point-in-time backup of your application before these upgrades—or at any time an application owner wants a new backup. All of this from the Portworx Data Services console.

Another common issue that comes up is managing performance over time. Your application might grow in popularity, and the size you initially deployed your MongoDB database will no longer be sufficient. Portworx Data Services will first help you identify a data service that is running short on resources, by giving users a dashboard with performance metrics.

pdsmeetrics

If your application is running low on resources and needs to scale out, you can very simply add another replica to your MongoDB deployment to achieve higher read performance or availability. MongoDB’s scale out architecture combined with Kubernetes orchestration, makes scaling databases as easy as modifying the number of replicas from the Portworx Data Services portal.

Summary

By using MongoDB Enterprise through Portworx Data Services, customers can more easily manage their data services in a hybrid cloud environment. Deploying databases in a standardized way across environments, through a self-service portal, and with customization options, developers can avoid waiting for data services to be provisioned on cloud or on-premises infrastructure, and they can instead deploy, upgrade, backup, and scale data services through a self-service portal.

For more information on MongoDB Enterprise and Portworx Data Services see these resources:

– MongoDB and Portworx Solutions page

– Portworx Data Services Product Page

– Whitepaper – Experts Guide to running Databases on Kubernetes

Share
Subscribe for Updates

About Us
Portworx is the leader in cloud native storage for containers.

Eric Shanks

Eric Shanks

Principal Technical Marketing Manager | Cloud Native BU, Pure Storage
Explore Related Content:
  • databases
  • mongodb
  • pds
link
hamburg gaeda
July 26, 2022 How To
Deploying Redis on Kubernetes with Portworx Data Services
Jon Owings
Jon Owings
link
fisk
May 11, 2022 How To
Accelerate data services deployment on Kubernetes using Portworx Data Services
Bhavin Shah
Bhavin Shah
link
iStock
June 3, 2022 How To
How to deploy Apache Cassandra on Kubernetes using Portworx Data Services
Bhavin Shah
Bhavin Shah