Skip to content
This repository was archived by the owner on Dec 12, 2025. It is now read-only.

Commit 8beec7b

Browse files
(DOCSP-9305): Simple CRD/install instructions
1 parent c8a8af3 commit 8beec7b

File tree

1 file changed

+57
-4
lines changed

1 file changed

+57
-4
lines changed

README.md

Lines changed: 57 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,73 @@ This is a Kubernetes Operator (https://coreos.com/operators/) which deploys Mong
66

77
This codebase is currently _pre-alpha_, and is not ready for use.
88

9-
If you are a MongoDB Enterprise customer, or need Enterprise features such as Backup, you may be looking for the [MongoDB Enterprise Operator for Kubernetes](https://github.com/mongodb/mongodb-enterprise-kubernetes).
9+
If you are a MongoDB Enterprise customer, or need Enterprise features such as Backup, you can use the [MongoDB Enterprise Operator for Kubernetes](https://github.com/mongodb/mongodb-enterprise-kubernetes).
1010

11+
## Installation
1112

13+
### Prerequisites
1214

15+
Before you install the MongoDB Community Kubernetes Operator, you must:
1316

14-
## Licensing
17+
1. Install [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
18+
2. Install [kind](https://kind.sigs.k8s.io/)
19+
3. Clone this repository.
20+
```
21+
git clone https://github.com/mongodb/mongodb-kubernetes-operator.git
22+
```
1523

16-
The source code of this Operator is available under the Apache v2 license.
24+
### Installing the MongoDB Community Kubernetes Operator
1725

18-
The MongoDB Agent binary in the agent/ directory may be used under the "Free for Commercial Use" license found in agent/LICENSE.
26+
The MongoDB Community Kubernetes Operator is a collection of [Custom Resource Definitions](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) and a controller.
27+
28+
To install the MongoDB Community Kubernetes Operator:
29+
30+
1. Change to the directory in which you cloned the repository.
31+
2. Install the [Custom Resource Definitions](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/).
32+
a. Invoke the following `kubectl` command:
33+
```
34+
kubectl create -f deploy/crds/mongodb.com_mongodb_crd.yaml
35+
```
36+
b. Verify that the Custom Resource Definitions installed successfully:
37+
```
38+
kubectl get crd/mongodb.mongodb.com
39+
```
40+
3. Install the Operator.
41+
a. Invoke the following `kubectl` command to install the Operator in the `default` namespace:
42+
```
43+
kubectl create -f deploy
44+
```
45+
To install the Operator in a different namespace, append the `--namespace <my-namespace>` option.
46+
b. Verify that the Operator installed successsfully:
47+
```
48+
kubectl get pods
49+
```
50+
51+
## Usage
52+
53+
The `/deploy/crds` directory contains example MongoDB resources that you can modify and deploy.
54+
55+
### Deploying a MongoDB Resource
1956
57+
To deploy your first replica set:
58+
59+
1. Invoke the following `kubectl` command:
60+
```
61+
kubectl apply -f deploy/crds/mongodb.com_v1_mongodb_cr.yaml
62+
```
63+
2. Verify that the MongoDB resource deployed:
64+
```
65+
kubectl get mongodb
66+
```
2067
2168
## Contributing
2269
2370
Please file issues before filing PRs. For PRs to be accepted, contributors must sign our [CLA](https://www.mongodb.com/legal/contributor-agreement).
2471
2572
Reviewers, please ensure that the CLA has been signed by referring to [the contributors tool](https://contributors.corp.mongodb.com/) (internal link).
73+
74+
## License
75+
76+
The source code of this Operator is available under the Apache v2 license.
77+
78+
The MongoDB Agent binary in the agent/ directory may be used under the "Free for Commercial Use" license found in agent/LICENSE.

0 commit comments

Comments
 (0)