Prerequisites¶
On this page
Procedure¶
To install the MongoDB Kubernetes Operator, you must:
Have a Kubernetes solution available to use.¶
If you need a Kubernetes solution, see the Kubernetes documentation on picking the right solution.
Clone the MongoDB Enterprise Kubernetes Operator repository.¶
Note
You can use Helm to install the Kubernetes Operator. To learn how to install Helm, see its documentation on GitHub.
Create a namespace for your Kubernetes deployment.¶
By default, The Kubernetes Operator uses the mongodb
namespace. To
simplify your installation, consider creating a namespace labeled
mongodb
using the following kubectl
command:
If you do not want to use the mongodb
namespace, you can label
your namespace anything you like:
Optional: Have a running Ops Manager.¶
If you don’t deploy an Ops Manager resource with the Kubernetes Operator, you must have an Ops Manager running outside of your Kubernetes cluster. If you will deploy an Ops Manager resource in Kubernetes with the Kubernetes Operator, skip this prerequisite.
Required for OpenShift Installs: Create a secret that contains credentials authorized to pull images from the registry.connect.redhat.com
repository.¶
If you have not already, obtain a Red Hat subscription.
Create a Registry Service Account.
Click on your Registry Service Account, then click the Docker Configuration tab.
Download the
<account-name>-auth.json
file and open it in a text editor.Copy the
registry.redhat.io
object, and paste another instance of this object into the file. Remember to add a comma after the first object. Rename the second objectregistry.connect.redhat.com
, then save the file:Create a
openshift-pull-secret.yaml
file with the contents of the modified<account-name>-auth.json
file asstringData
named.dockerconfigjson
:The value you provide in the
metadata.name
field contains the secret name. Provide this value when asked for the<openshift-pull-secret>
.Create a secret from the
openshift-pull-secret.yaml
file: