MongoDB Atlas Open Service Broker brings Managed MongoDB to Kubernetes

Ben Elgar


Modern applications are increasingly cloud-native and being deployed with Kubernetes and other platforms. Easily managed databases for these cloud-native deployments has become an essential requirement.

With MongoDB Atlas, managing global databases is already simple, and with the MongoDB Atlas Open Service Broker, you can scale that simplicity across your cloud-native deployments. That means you can have your applications seamlessly integrated with a reliable managed database service. It also means that there are no custom scripts to maintain and the system is easily replicated and consistent.

What is it?

The Open Service Broker can be addressed by any platform that can make use of the Open Service Broker API, including but not limited to Kubernetes. The broker takes requests and sends them on to the appropriate Atlas Public API endpoints where it can deploy replica sets and clusters under the management of Atlas.

How do you deploy Atlas Open Service Broker?

The Open Service Broker is self hosted; you install it into your Kubernetes cluster. The host will need to be given an Atlas API programmatic key with appropriate authorizations to perform administration operations, and the host itself will need to be whitelisted with Atlas to allow it to connect. Your Kubernetes cluster will also need the Kubernetes Service Catalog installed. The full installation process is detailed in the Atlas Open Service Broker documentation.

How do you use Atlas Open Service Broker?

Deploying Atlas Clusters

Once installed, it is possible to create resource definitions for Atlas replica sets and sharded clusters which can be acted on by using kubectl apply with the definition. The deployment can then be tracked with svcat describe. Resource definitions can cover cluster tier, cloud service provider and region, settings for auto-scaling and backups and nearly all other Atlas Public API accessible configuration.

Editing an already deployed database resource definition and re-applying it will modify it to conform to the new definition. The kubectl delete command can be used to remove database instances from an operation. The Database Deployment documentation covers all these operations including how to craft resource definitions.

Managing Users

Deploying a database is only half the story; applications need user credentials to be able to access their databases. The Atlas Open Service Broker manages this through a ServiceBinding resource, which associates a username and namespace with a cluster.

By applying this ServiceBinding, a new user on the database cluster or replica set is created. The credentials required by applications, username, password and URI, are all stored as a Kubernetes secret. The User management documentation covers how roles and other settings can be assigned to users.

Consistent and Compatible Deployments

The Atlas Open Service Broker works with any deployment platform that employs the Open Service Broker API, be it Kubernetes, OpenShift or Cloud Foundry. It allows you to retain flexibility in platform choice while relying on MongoDB Atlas's global managed database offerings in your applications.

The Atlas Open Service Broker is one of a range of Kubernetes integrations for MongoDB. MongoDB Enterprise Operator for Kubernetes is available for customers who want a similar capability with their Ops Manager managed on-premise MongoDB deployments or Cloud Manager managed cloud-based MongoDB deployments. You can read more about that in Introducing the MongoDB Enterprise Operator for Kubernetes .