Last changed
Be the first to hear about exciting product updates, critical vulnerability alerts, compare alternative images, and more.
Sign UpChainguard's MongoDB Kubernetes Operator image enables you to deploy a MongoDB community instance to a Kubernetes cluster, as well as support replica sets, scaling the replicas up or down, version upgrades, custom roles, and TLS security.
Chainguard Containers are regularly-updated, secure-by-default container images.
For those with access, this container image is available on cgr.dev
:
Be sure to replace the ORGANIZATION
placeholder with the name used for your organization's private repository within the Chainguard Registry.
Chainguard's MongoDB Kubernetes Operator image is comparable to the upstream image. Switching to the Chainguard image should not require any changes to your existing setup. However, the operator expects /bin/sh
to be available in the MongoDB container image. If you're not using the -dev
variant, you'll need to ensure your MongoDB image includes bash
or a bash-binsh
symlink to provide compatibility.
We also attempted to secure MongoDBCommunity resource connections using TLS, but encountered SSL handshake failures in the replica set pods when following the guide, both with our image and the upstream image.
Upstream runs the container as uid=2000
and gid=0
, but we've verified that the image works correctly with uid=65532
and gid=65532
, so we've configured it to run as non-root.
Note that upstream components of the MongoDB Kubernetes Operator use different versioning schemes—for example, the main operator uses versions like 0.12.x
, while the version hook component uses 1.0.x
. You can see this in the upstream release.json
. In contrast, Chainguard images for all related components (e.g., the operator and version hook) will share the same tag, aligned with the main operator version. This is due to our Git-based automation, and because upstream does not provide separate Git tags for components like the version hook (see tags). While this differs from upstream's tagging scheme, all components are still built from the same source and version-aligned internally. Just be aware that users will not see separate tags per component.
To get started with Chainguard's MongoDB Kubernetes Operator image, begin by installing the CRDs:
To launch the MongoDB Kubernetes Operator in a Docker container, use the following command:
To deploy the MongoDB Kubernetes Operator in your cluster, create the required service account and role:
Next, create a deployment manifest that will deploy the operator with the Chainguard image:
Finally, apply the service account and deployment:
Chainguard Containers are minimal container images that are secure by default.
In many cases, the Chainguard Containers tagged as :latest
contain only an open-source application and its runtime dependencies. These minimal container images typically do not contain a shell or package manager. Chainguard Containers are built with Wolfi, our Linux undistro designed to produce container images that meet the requirements of a more secure software supply chain.
The main features of Chainguard Containers include:
For cases where you need container images with shells and package managers to build or debug, most Chainguard Containers come paired with a -dev
variant.
Although the -dev
container image variants have similar security features as their more minimal versions, they feature additional software that is typically not necessary in production environments. We recommend using multi-stage builds to leverage the -dev
variants, copying application artifacts into a final minimal container that offers a reduced attack surface that won’t allow package installations or logins.
To better understand how to work with Chainguard Containers, please visit Chainguard Academy and Chainguard Courses.
In addition to Containers, Chainguard offers VMs and Libraries. Contact Chainguard to access additional products.
This software listing is packaged by Chainguard. The trademarks set forth in this offering are owned by their respective companies, and use of them does not imply any affiliation, sponsorship, or endorsement by such companies.
Chainguard container images contain software packages that are direct or transitive dependencies. The following licenses were found in the "latest" version of this image:
Apache-2.0
GCC-exception-3.1
GPL-2.0-or-later
GPL-3.0-or-later
LGPL-2.1-or-later
MIT
MPL-2.0
For a complete list of licenses, please refer to this Image's SBOM.
Software license agreementA FIPS validated version of this image is available for FedRAMP compliance. STIG is included with FIPS image.