Make the MongoDB docs better! We value your opinion. Share your feedback for a chance to win $100.
MongoDB Branding Shape
Click here >
Docs Menu

Configure Access to Atlas

To connect to the Atlas Administration API, Atlas Kubernetes Operator reads the organization ID and credentials from Atlas Kubernetes Operator secrets. You can authenticate using API keys or Service Accounts. You can also configure the following features:

To learn more about creating an Atlas account, see Register and Log in to Atlas.

Depending on your configuration, Atlas Kubernetes Operator reads from one of the following Atlas Kubernetes Operator secrets:

Scope
Location
Description

Global

Atlas Kubernetes Operator secret <operator-deployment-name>-api-key created in the same namespace where you installed Atlas Kubernetes Operator.

Atlas Kubernetes Operator uses this secret data to connect to the Atlas Administration API unless the AtlasProject Custom Resource specifies spec.connectionSecretRef.name.

global Atlas Kubernetes Operator secrets let you use one set of credentials for all the projects in an organization. Any new AtlasProject Custom Resource uses the same credentials for reduced overhead.

The default name of the Atlas Kubernetes Operator deployment is mongodb-atlas-operator. So, the secret should be named mongodb-atlas-operator-api-key.

Project

Atlas Kubernetes Operator secret referenced with spec.connectionSecretRef.name in the AtlasProject Custom Resource.

By default, Atlas Kubernetes Operator keeps connection secrets in the same namespace as the AtlasProject Custom Resource. To store secrets in another namespace, specify the spec.connectionSecretRef.namespace parameter.

Atlas Kubernetes Operator uses this secret data to connect to the Atlas Administration API for any AtlasDeployment Custom Resource and AtlasDatabaseUser custom resource that references the project.

If you do not specify spec.connectionSecretRef.name, Atlas Kubernetes Operator uses the global Atlas Kubernetes Operator secret.

Atlas Kubernetes Operator secrets per project allow for more granular access. You may want a single set of credentials to have access to a single Atlas project.

Both global and project secrets require the following information:

Choose one of the following authentication methods:

To configure Atlas Kubernetes Operator access to Atlas, create a secret with your credentials. Choose the tab that matches your preferred authentication method: