- Reference >
- MongoDB Enterprise Kubernetes Operator Installation Settings >
- MongoDB Enterprise Kubernetes Operator
kubectl
andoc
Installation Settings
MongoDB Enterprise Kubernetes Operator kubectl
and oc
Installation Settings¶
On this page
- APPDB_AGENT_VERSION
- APPDB_IMAGE_REPOSITORY
- CLUSTER_CLIENT_TIMEOUT
- DATABASE_VERSION
- IMAGE_PULL_POLICY
- INIT_APPDB_IMAGE_REPOSITORY
- INIT_APPDB_VERSION
- INIT_DATABASE_IMAGE_REPOSITORY
- INIT_DATABASE_VERSION
- INIT_OPS_MANAGER_IMAGE_REPOSITORY
- INIT_OPS_MANAGER_VERSION
- MANAGED_SECURITY_CONTEXT
- MDB_APPDB_ASSUME_OLD_FORMAT
- MDB_IMAGE_TYPE
- MONGODB_ENTERPRISE_DATABASE_IMAGE
- OPERATOR_ENV
- OPS_MANAGER_IMAGE_PULL_POLICY
- OPS_MANAGER_IMAGE_REPOSITORY
- WATCH_NAMESPACE
To provide optional settings, edit the YAML file that corresponds to your deployment type in the directory where you cloned the Kubernetes Operator repository:
- Vanilla Kubernetes using
kubectl
: mongodb-enterprise.yaml - OpenShift using
oc
: mongodb-enterprise-openshift.yaml
If the setting that you want to add doesn’t exist in the YAML file, add it as a new array of key-value pair mappings in the spec.template.spec.containers.name.env. collection:
- Set the value of the spec.template.spec.containers.name.env.name key to the setting’s name.
- Set the value of the spec.template.spec.containers.name.env.value key to the setting’s value.
To fill in values for container images, see Container Images.
Example
APPDB_AGENT_VERSION¶
Version of the image that contains the MongoDB Agent that the Application Database uses.
The default value is 10.2.15.5958-1_4.2.11-ent.
Example
APPDB_IMAGE_REPOSITORY¶
URL of the repository from which the Kubernetes Operator downloads the Application Database image.
Example
CLUSTER_CLIENT_TIMEOUT¶
Time, in seconds, the Kubernetes Operator attempts to connect to a cluster’s Kubernetes API server endpoint. This timeout is set for all Kubernetes clusters in multi-Kubernetes-cluster deployments. If the Kubernetes Operator doesn’t get a response from the Kubernetes API server within the specified time, it logs the cluster’s status as “unhealthy”. To learn more, see Troubleshooting Kubernetes Clusters.
The default value is 10.
Example
DATABASE_VERSION¶
Version of the MongoDB Enterprise Database image that the Kubernetes Operator deploys.
Example
IMAGE_PULL_POLICY¶
Pull policy for the MongoDB Enterprise database image the Kubernetes Operator deploys.
The Kubernetes Operator accepts the following values: Always, IfNotPresent, Never.
The default value is Always.
Example
INIT_APPDB_IMAGE_REPOSITORY¶
URL of the repository from which the initContainer
image that
contains the Application Database start-up scripts and the readiness
probe is downloaded.
Example
INIT_APPDB_VERSION¶
Version of the initContainer
image that contains the Application
Database start-up scripts and the readiness probe.
The default value is 1.0.6.
Example
INIT_DATABASE_IMAGE_REPOSITORY¶
URL of the repository from which the initContainer
image that
contains the MongoDB Agent start-up scripts and the readiness probe is
downloaded.
Example
INIT_DATABASE_VERSION¶
Version of the initContainer
image that contains the MongoDB Agent
start-up scripts and the readiness probe.
The default value is 1.0.2.
Example
INIT_OPS_MANAGER_IMAGE_REPOSITORY¶
URL of the repository from which the initContainer
image that
contains the Ops Manager start-up scripts and the readiness probe is
downloaded.
Example
INIT_OPS_MANAGER_VERSION¶
Version of the initContainer
image that contains the Ops Manager
start-up scripts and the readiness probe.
The default value is 1.0.3.
Example
MANAGED_SECURITY_CONTEXT¶
Flag that determines whether or not the Kubernetes Operator inherits the securityContext settings that your Kubernetes cluster manages.
This value must be true if you want to run the Kubernetes Operator in OpenShift or in a restrictive environment.
- Kubernetes
- OpenShift
The default value is false.
Example
The default value is true.
Example
MDB_APPDB_ASSUME_OLD_FORMAT¶
In Kubernetes Operator 1.20, the container registry changed for the application database image and the images use a new tag suffix. When you upgrade the Kubernetes Operator, the Kubernetes Operator automatically updates the earlier suffix, -ent
, for all images that reference the new container registry to -ubi8
or the suffix set in MDB_IMAGE_TYPE or mongodb.imageType.
For example, the Kubernetes Operator changes quay.io/mongodb/mongodb-enterprise-server:4.4.5-ent
to quay.io/mongodb/mongodb-enterprise-server:4.4.5-ubi8
.
To stop the Kubernetes Operator from automatically updating the suffix, set MDB_APPDB_ASSUME_OLD_FORMAT or mongodb.appdbAssumeOldFormat to true
. For example, you might want to stop the automatic suffix change if you’re mirroring this image from your own repository.
The default value is false
, which automatically updates the image suffix.
Example
MDB_IMAGE_TYPE¶
The suffix of the application database image.
In Kubernetes Operator 1.20, the container registry changed for the application database image and the images use a new tag suffix. When you upgrade the Kubernetes Operator, the Kubernetes Operator automatically updates the earlier suffix, -ent
, for all images that reference the new container registry to -ubi8
or the suffix set in MDB_IMAGE_TYPE or mongodb.imageType.
For example, the Kubernetes Operator changes quay.io/mongodb/mongodb-enterprise-server:4.4.5-ent
to quay.io/mongodb/mongodb-enterprise-server:4.4.5-ubi8
.
To stop the Kubernetes Operator from automatically updating the suffix, set MDB_APPDB_ASSUME_OLD_FORMAT or mongodb.appdbAssumeOldFormat to true
. For example, you might want to stop the automatic suffix change if you’re mirroring this image from your own repository.
The default is -ubi8
.
Example
MONGODB_ENTERPRISE_DATABASE_IMAGE¶
URL of the MongoDB Enterprise Database image that the Kubernetes Operator deploys.
Example
OPERATOR_ENV¶
Label for the Kubernetes Operators deployment environment. This value affects the default timeouts and the logging level and format:
If the value is | Log Level is set to | Log Format is set to |
---|---|---|
dev |
debug | text |
prod |
info | json |
The default value is prod.
Example
OPS_MANAGER_IMAGE_PULL_POLICY¶
Pull policy for the Ops Manager images the Kubernetes Operator deploys.
The Kubernetes Operator accepts the following values: Always, IfNotPresent, and Never.
The default value is Always.
Example
OPS_MANAGER_IMAGE_REPOSITORY¶
URL of the repository from which the image for an Ops Manager resource is downloaded.
Example
WATCH_NAMESPACE¶
Namespaces that the Kubernetes Operator watches for MongoDB
resource
changes. If this namespace differs from the default, ensure that
the Kubernetes Operator ServiceAccount can access
this namespace.
- To watch all namespaces, specify * and assign the ClusterRole to the
mongodb-enterprise-operator
ServiceAccount that you use to run the Kubernetes Operator. - To watch a subset of all namespaces, specify them in a
comma-separated list, escape each comma with a backslash,
and surround the list in quotes, such as
"operator.watchNamespace=ns1\,ns2"
.
Watching a subset of namespaces is useful in deployments where a single
Kubernetes Operator instance watches a different cluster resource type.
For example, you can configure the Kubernetes Operator to watch MongoDB
resources
in one subset of namespaces, and to watch MongoDBMultiCluster
resources in another
subset of namespaces. To avoid race conditions during resource reconciliation,
for each custom resource type that you want the Kubernetes Operator to watch,
ensure that you set scope to a distinct subset of namespaces.
Important
To deploy Ops Manager and MongoDB
resources to one or more namespaces other
than the one where you deploy the Kubernetes Operator,
see Set Scope for MongoDB Enterprise Kubernetes Operator Deployment for values you must use and
additional steps you might have to perform.
The default value is <metadata.namespace>.
Example