> This page location: /docs.md > /docs/management.md > /docs/atlas/operator/current.md > /docs/atlas/operator/current/ak8so-get-started.md

> For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt

<!--
Tab options on this page. Append to the .md URL to filter:
  ?tabs=<id,...>   select specific tabs (e.g. ?tabs=nodejs,shell)
  ?allTabs=true    include every tab
  (no param)       default: one tab per tabset

Available tabs:
  other tabs: api-keys, service-account
-->

# Helm Charts Quick Start

Atlas Kubernetes Operator doesn't support Atlas Infinite Database clusters in public preview. To learn which features Atlas Infinite Database supports in public preview, see [Atlas Infinite Database Edition](https://www.mongodb.com/docs/atlas/infinite/atlas-infinite-landing/). To learn more about preview features, see [Preview Features](https://www.mongodb.com/docs/preview-features/).

You can use Atlas Kubernetes Operator to manage resources in Atlas without leaving Kubernetes. This tutorial demonstrates how to create your first cluster in Atlas from Helm Charts with Atlas Kubernetes Operator.

**Note: Would you prefer to start without Helm?**

To create your first cluster in Atlas from Kubernetes configuration files with Atlas Kubernetes Operator, see [Quick Start.](https://www.mongodb.com/docs/atlas/operator/current/ak8so-quick-start.md#std-label-ak8so-quick-start-ref)

## Prerequisites

This tutorial requires:

- A running Kubernetes cluster with nodes running processors with the x86-64, AMD64, or ARM64 architecture.

You can access the Atlas Kubernetes Operator project on GitHub:

- [https://github.com/mongodb/mongodb-atlas-kubernetes](https://github.com/mongodb/mongodb-atlas-kubernetes)

## Procedure

**Important: Custom Resources No Longer Delete Objects by Default**

- Atlas Kubernetes Operator uses [custom resource](https://www.mongodb.com/docs/atlas/operator/current/custom-resources.md#std-label-custom-resources) configuration files to manage your Atlas configuration, but as of Atlas Kubernetes Operator 2.0, custom resources you delete in Kubernetes are no longer (by default) deleted in Atlas. Instead, Atlas Kubernetes Operator simply stops managing those resources  in Atlas. For example, if you delete an [`AtlasProject` Custom Resource](https://www.mongodb.com/docs/atlas/operator/current/atlasproject-custom-resource.md#std-label-atlasproject-custom-resource) in Kubernetes, by default the Atlas Kubernetes Operator no longer automatically deletes the corresponding project from Atlas. This change in behavior is intended to help prevent accidental or unexpected deletions. To learn more, including how to [revert this behavior](https://www.mongodb.com/docs/atlas/operator/current/index.md#std-label-revert-deletion-protection) to the default used prior to Atlas Kubernetes Operator 2.0, see [New Default: Deletion Protection in Atlas Kubernetes Operator 2.0.](https://www.mongodb.com/docs/atlas/operator/current/index.md#std-label-deletion-protection)

  Similarly, Atlas Kubernetes Operator does not delete teams from Atlas if you remove them from an Atlas project in Kubernetes with the Atlas Kubernetes Operator.

- Explicitly define your desired configuration details in order to avoid implicitly using default Atlas configuration values. In some cases, inheriting Atlas defaults may result in a reconciliation loop which can prevent your custom resource from achieving a `READY` state. For example, explicitly defining your desired autoscaling behavior in your `AtlasDeployment` custom resource, as shown in the included example, ensures that a static instance size in your custom resource is not being repeatedly applied to an Atlas deployment which has autoscaling enabled.

  ```yaml
  autoScaling:
    diskGB:
      enabled: true
    compute:
      enabled: true
      scaleDownEnabled: true
      minInstanceSize: M30
      maxInstanceSize: M40
  ```

1. Register for an Atlas account or log in.

   [Register and Log in to Atlas](https://www.mongodb.com/docs/atlas/tutorial/create-atlas-account.md#std-label-atlas-register-account) or [Register and Log in to Atlas.](https://www.mongodb.com/docs/atlas/tutorial/create-atlas-account.md#std-label-atlas-account-login)

2. Create credentials for your organization.

   Create credentials that Atlas Kubernetes Operator uses to authenticate with Atlas. Choose one of the following:

   ### API Keys

   Create an API (Application Programming Interface) key with [`Organization Project Creator`](https://www.mongodb.com/docs/atlas/reference/user-roles.md#mongodb-authrole-Organization-Project-Creator) or [`Project Owner`](https://www.mongodb.com/docs/atlas/reference/user-roles.md#mongodb-authrole-Project-Owner) permissions by following the procedure in [Grant Programmatic Access to an Organization.](https://www.mongodb.com/docs/atlas/configure-api-access.md#std-label-create-org-api-key)

3. Deploy Atlas Kubernetes Operator.

   Run one of the following sets of commands:

   - If you want Atlas Kubernetes Operator to watch all [namespaces](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) in the Kubernetes cluster, run the following commands:

     ```sh
     helm repo add mongodb https://mongodb.github.io/helm-charts
     helm install atlas-operator --namespace=atlas-operator --create-namespace mongodb/mongodb-atlas-operator
     ```

   - If you want Atlas Kubernetes Operator to watch a particular set of [namespaces](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/), set the  `--watchNamespaces` flag to a comma-separated list of [namespaces](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) to be watched. For example, run the following command to watch only the `atlas-operator` namespace:

     ```sh
     helm install atlas-operator --namespace=atlas-operator --set watchNamespaces=atlas-operator --create-namespace mongodb/mongodb-atlas-operator
     ```

4. Deploy the Atlas database deployment.

   Customize the Atlas project and its database users.

   **Note:**

   You can find the following additional example Helm Charts in GitHub:

   - [atlas-basic](https://github.com/mongodb/helm-charts/tree/main/charts/atlas-basic): A simple Atlas Kubernetes Operator deployment example that includes the creation of an Atlas project, cluster and a database user.

   - [atlas-advanced](https://github.com/mongodb/helm-charts/tree/main/charts/atlas-advanced): An extensible, advanced Atlas Kubernetes Operator example deployment with boilerplate related to multi-region deployments, autoscaling behavior and more.

   Create a file named `install-values.yaml` and paste the following example code, which does the following:

   - Sets the project name to `My Project`.

   - Allows all IP addresses (0.0.0.0) to access the project.

   - Creates a database user named `dbadmin` that has the [`dbAdmin`](https://www.mongodb.com/docs/manual/reference/built-in-roles.md#mongodb-authrole-dbAdmin) role.

   - Creates a database user named `dbuser` that has the [`readWrite`](https://www.mongodb.com/docs/manual/reference/built-in-roles.md#mongodb-authrole-readWrite) role.

   ```yaml
   project: # Project custom values
     atlasProjectName: "My Project"
     projectIpAccessList:
       - cidrBlock: "0.0.0.0/0"

   users: # Custom database users
     - username: dbadmin
       databaseName: admin
       roles:
         - databaseName: admin-role
           roleName: dbAdmin
     - username: dbuser
       databaseName: admin
       roles:
         - databaseName: user-role
           roleName: readWrite
   ```

   Run the following command.

   The `--set` and `--values` flags in the following command override the `Values.yaml` file values and default Helm Charts values with your organization ID, credentials, and Atlas project configuration.

   **Note:**

   `mongodb/atlas-deployment` references the name of a chart in the repository.

   ### API Keys

   ```sh
   helm install atlas-deployment \
   mongodb/atlas-deployment \
   --namespace=my-cluster \
   --create-namespace \
   --set atlas.secret.orgId='<orgid>' \
   --set atlas.secret.publicApiKey='<publicKey>' \
   --set atlas.secret.privateApiKey='<privateApiKey>' \
   --values install-values.yaml
   ```

   **Note:**

   For a complete list of supported Helm values for authentication and other chart parameters, see the [values.yaml](https://github.com/mongodb/helm-charts/blob/main/charts/atlas-deployment/values.yaml) file in the `helm-charts` repository.

   To learn more about Atlas Kubernetes Operator custom resource parameters, see [`AtlasDeployment` Custom Resource.](https://www.mongodb.com/docs/atlas/operator/current/atlasdeployment-custom-resource.md#std-label-atlasdeployment-custom-resource)

   To create a Serverless instance, see the [Serverless instance example.](https://www.mongodb.com/docs/atlas/operator/current/atlasdeployment-custom-resource.md#std-label-ak8so-serverless-instance)

5. Check the status of your database user.

   Run the following command to wait for the `dbadmin` database user to become ready:

   ```sh
   kubectl wait --for=condition=ready  --timeout=10m -n my-cluster atlasdatabaseusers/atlas-deployment-dbadmin
   ```

   **Note:**

   The [`AtlasDatabaseUser` Custom Resource](https://www.mongodb.com/docs/atlas/operator/current/atlasdatabaseuser-custom-resource.md#std-label-atlasdatabaseuser-custom-resource) waits until the cluster is ready. Creating a new Free cluster takes less than 15 seconds. Creating a new Flex or Dedicated cluster can take up to 10 minutes.

6. Retrieve the secret that Atlas Kubernetes Operator created to connect to the database deployment.

   **Important:**

   The following command requires `jq` 1.6 or higher.

   Run the following command to retrieve the connection string and password for the `dbadmin` database user. Your connection strings will differ from the example output.

   ```sh
   kubectl get secret -n my-cluster my-project-cluster-name-dbadmin  -o json | jq -r '.data | with_entries(.value |= @base64d)';
   ```

   **Output:**

   ```json
   {
      "connectionStringStandard": "mongodb://admin-user:%25SomeLong%25password$foradmin@atlas-cluster-shard-00-00.nlrvs.mongodb.net:27017,atlas-cluster-shard-00-01.nlrvs.mongodb.net:27017,atlas-cluster-shard-00-02.nlrvs.mongodb.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-11q9bn-shard-0",
      "connectionStringStandardSrv": "mongodb+srv://admin-user:%25SomeLong%25password$foradmin@atlas-cluster.nlrvs.mongodb.net",
      "password": "%SomeLong%password$foradmin",
      "username": "dbadmin"
   }
   ```

   You can use the following [secret](https://kubernetes.io/docs/concepts/configuration/secret/) in your application:

   ```sh
   containers:
    - name: test-app
      env:
        - name: "CONNECTION_STRING"
          valueFrom:
            secretKeyRef:
              name: my-project-cluster-name-dbadmin
              key: connectionStringStandardSrv
   ```
