Kubernetes Operator
The DocumentDB Kubernetes Operator runs and manages DocumentDB clusters on Kubernetes. You describe a cluster as a DocumentDB resource, and the operator provisions it and handles high availability, failover, backups, and upgrades, building on CloudNativePG for the PostgreSQL layer. Every instance pairs a PostgreSQL container with a DocumentDB gateway sidecar, so applications connect using MongoDB-compatible drivers exactly as they would to any other DocumentDB deployment.
The operator is a separate project, with its own repository, release cadence, and documentation. This page covers when to reach for it and what your cluster needs; the operator's own documentation covers everything else.
| Option | Best for |
|---|---|
| DocumentDB Local | A single container for development, prototyping, and integration tests. |
| Pre-built packages | Adding DocumentDB to a PostgreSQL server you already run and operate yourself. |
| Kubernetes Operator | Running DocumentDB as a replicated service, with automatic failover, rolling upgrades, backup and restore, and multi-region deployments. |
Check one thing before you plan a deployment. The operator mounts the DocumentDB extension into PostgreSQL pods using the Kubernetes ImageVolume feature, which constrains where it can run:
ImageVolume feature gate on the API server and the kubelets.If the feature is unavailable, the operator's admission webhook rejects the DocumentDB resource with an explanatory error rather than leaving pods stuck. Managed Kubernetes offerings vary in the versions and runtimes they expose, and local tools often need an explicit flag to select a supported runtime, so confirm both up front. Before You Start has the full prerequisite list, including supported tooling versions and resource sizing.
The operator's documentation is versioned and published alongside its releases:
mongosh and driver examples for Python, Node.js, Go, and JavaDocumentDB, Backup, and ScheduledBackup resourcesReport operator issues in the operator repository rather than this one.