Skip to content

Commit 4b7471e

Browse files
authored
Adding First Readme to the project (#55)
1 parent 1341743 commit 4b7471e

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,59 @@
11
# MongoDB Atlas Operator
22
Welcome to MongoDB Atlas Operator - the Operator allowing to manage Atlas Clusters from Kubernetes.
3+
> Current Status: *pre-alpha*. We are currently working on the initial set of features that will give users the opportunity to provision Atlas projects, clusters and database users using Kubernetes Specifications and bind connection information into the applications deployed to Kubernetes.
4+
## Quick Start guide
5+
### Step 1. Deploy Kubernetes operator using all in one config file
6+
```
7+
kubectl apply -f https://raw.githubusercontent.com/mongodb/mongodb-atlas-kubernetes/deploy/all-in-one.yaml
8+
```
9+
### Step 2. Create Atlas Cluster
10+
11+
**1.** Create Atlas API Key Secret
12+
In order to work with Atlas Operator you'll need to provide the [authentication information](https://docs.atlas.mongodb.com/configure-api-access) that would allow the Atlas Operator communicate with Atlas API. You need to create the secret first:
13+
```
14+
kubectl create secret generic my-atlas-key \
15+
--from-literal="orgId=<the_atlas_organization_id>" \
16+
--from-literal="publicApiKey=<the_atlas_api_public_key>" \
17+
--from-literal="privateApiKey=<the_atlas_api_private_key>"
18+
```
19+
**2.** Create `AtlasProject` Custom resource
20+
21+
`AtlasProject` represents Atlas Project in our Kubernetes cluster.
22+
Note: Property `connectionSecretRef` should reference the Secret `my-atlas-key` that was created in previous step:
23+
```
24+
cat <<EOF | kubectl apply -f -
25+
apiVersion: atlas.mongodb.com/v1
26+
kind: AtlasProject
27+
metadata:
28+
name: my-project
29+
spec:
30+
name: Test Atlas Operator Project
31+
connectionSecretRef:
32+
name: my-atlas-key
33+
EOF
34+
```
35+
**3.** Create the `AtlasCluster` Resource.
36+
Example below is a minimal configuration for Atlas MongoDB Cluster in AWS US East region, size M10. For a full list of properties check
37+
`atlasclusters.atlas.mongodb.com` [CRD specification](config/crd/bases/atlas.mongodb.com_atlasclusters.yaml)):
38+
```
39+
cat <<EOF | kubectl apply -f -
40+
apiVersion: atlas.mongodb.com/v1
41+
kind: AtlasCluster
42+
metadata:
43+
name: my-atlas-cluster
44+
spec:
45+
name: "Test-cluster"
46+
projectRef:
47+
name: my-project
48+
providerSettings:
49+
instanceSizeName: M10
50+
providerName: AWS
51+
regionName: US_EAST_1
52+
EOF
53+
```
54+
### Step 3. Inspect Atlas Cluster Status
55+
You can use the following command to track the status of the Atlas Cluster Resource
56+
```
57+
kubectl get atlasclusters.atlas.mongodb.com -o yaml
58+
```
359

0 commit comments

Comments
 (0)