Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/examples/documentdb/quickstart/standalone.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: kubedb.com/v1alpha2
kind: DocumentDB
metadata:
name: documentdb
namespace: demo
spec:
version: "pg17-0.109.0"
storageType: Durable
deletionPolicy: Delete
replicas: 1
storage:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
103 changes: 103 additions & 0 deletions docs/guides/documentdb/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
---
title: DocumentDB
menu:
docs_{{ .version }}:
identifier: documentdb-readme
name: DocumentDB
parent: documentdb-guides
weight: 10
menu_name: docs_{{ .version }}
section_menu_id: guides
url: /docs/{{ .version }}/guides/documentdb/
aliases:
- /docs/{{ .version }}/guides/documentdb/README/
---

> New to KubeDB? Please start [here](/docs/README.md).

# Overview

KubeDB supports MongoDB-compatible documentdb database using the DocumentDB Custom Resource Definition (CRD). You can define the desired DocumentDB configuration in a YAML manifest, and KubeDB provisions and manages the necessary Kubernetes resources.

KubeDB simplifies deploying and managing DocumentDB on Kubernetes with a declarative API. It automates common operational tasks such as:

- Creating and provisioning standalone DocumentDB instances
- Managing persistent storage and data recovery
- Handling authentication and authorization
- Customizing pod templates and service configurations
- Monitoring database health

## Supported DocumentDB Features

| Features | Availability |
|----------------------------------|:------------:|
| Standalone DocumentDB deployment | ✓ |
| Persistent volume | ✓ |
| Authentication secret | ✓ |
| Pod and service customization | ✓ |
| Health checker | ✓ |
| Custom RBAC | ✓ |
| Private registry | ✓ |


## Example DocumentDB Manifest
Here's a simple example of a DocumentDB deployment:

```yaml
apiVersion: kubedb.com/v1alpha2
kind: DocumentDB
metadata:
name: documentdb
spec:
version: "pg17-0.109.0"
storageType: Durable
deletionPolicy: Delete
replicas: 1
storage:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
```

For a complete list of available configuration options, see the [DocumentDB CRD Documentation](/docs/guides/documentdb/concepts/documentdb.md).

## User Guide

Learn about DocumentDB features and how to use them:

### Quickstart
- [Quickstart](/docs/guides/documentdb/quickstart/quickstart.md) - Deploy your first DocumentDB instance with KubeDB operator

### Concepts
- [DocumentDB CRD](/docs/guides/documentdb/concepts/documentdb.md) - Understand the DocumentDB Custom Resource Definition and all available configuration options
- [DocumentDBVersion CRD](/docs/guides/documentdb/concepts/catalog.md) - Learn about specifying DocumentDB versions and docker images

### Setup & Configuration
- [Custom RBAC](/docs/guides/documentdb/custom-rbac/using-custom-rbac.md) - Setup custom ServiceAccount, Role, and RoleBinding for DocumentDB instances
- [Using Private Registry](/docs/guides/documentdb/private-registry/using-private-registry.md) - Deploy DocumentDB using images from a private docker registry



## Architecture

KubeDB uses a PetSet (similar to StatefulSet) to manage DocumentDB instances, ensuring stable network identities and persistent storage. Each DocumentDB instance:

- Runs as a single pod in a PetSet
- Uses a PersistentVolume for data storage

## What's Next

- **Want to learn more?** Check out the [DocumentDB Concepts](/docs/guides/documentdb/concepts/documentdb.md) page and explore the [Configuration](/docs/guides/documentdb/concepts/documentdb.md) options.
- **Want to deploy DocumentDB?** Follow the [Quickstart](/docs/guides/documentdb/quickstart/quickstart.md) guide.
- **Want to set up custom RBAC?** See the [Custom RBAC](/docs/guides/documentdb/custom-rbac/using-custom-rbac.md) guide.
- **Want to use a private registry?** Follow the [Private Registry](/docs/guides/documentdb/private-registry/using-private-registry.md) guide.

## Support

To speak with us, use the [Slack channel](http://slack.appscode.com) in the `#kubedb` room.

## Contributing

Want to help improve KubeDB? Please start [here](/docs/CONTRIBUTING.md).
10 changes: 10 additions & 0 deletions docs/guides/documentdb/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: DocumentDB
menu:
docs_{{ .version }}:
identifier: documentdb-guides
name: DocumentDB
parent: guides
weight: 13
menu_name: docs_{{ .version }}
---
10 changes: 10 additions & 0 deletions docs/guides/documentdb/concepts/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: DocumentDB Concepts
menu:
docs_{{ .version }}:
identifier: documentdb-concepts
name: Concepts
parent: documentdb-guides
weight: 15
menu_name: docs_{{ .version }}
---
68 changes: 68 additions & 0 deletions docs/guides/documentdb/concepts/catalog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
title: DocumentDBVersion CRD
menu:
docs_{{ .version }}:
identifier: documentdb-catalog-concepts
name: DocumentDBVersion
parent: documentdb-concepts-documentdb
weight: 15
menu_name: docs_{{ .version }}
section_menu_id: guides
---

> New to KubeDB? Please start [here](/docs/README.md).

# DocumentDBVersion

## What is DocumentDBVersion

`DocumentDB` is a Kubernetes `Custom Resource Definitions` (CRD). It provides a declarative configuration to specify the docker images to be used for [DocumentDB](https://documentdb.apache.org) database deployed with KubeDB in a Kubernetes native way.

When you install KubeDB, a `DocumentDBVersion` custom resource will be created automatically for every supported DocumentDB versions. You have to specify the name of `DocumentDBVersion` CR in `spec.version` field of [DocumentDB](/docs/guides/documentdb/concepts/documentdb.md) crd. Then, KubeDB will use the docker images specified in the `DocumentDB` CR to create your expected database.

Using a separate CRD for specifying respective docker images, and pod security policy names allow us to modify the images, and policies independent of KubeDB operator.This will also allow the users to use a custom image for the database.


## DocumentDBVersion Specification

```yaml
apiVersion: catalog.kubedb.com/v1alpha1
kind: DocumentDBVersion
metadata:
name: "pg17-0.109.0"
spec:
version: "pg17-0.109.0"
db:
image: "kubedb/documentdb:pg17-0.109.0"
deprecated: false
```

### metadata.name

`metadata.name` is a required field that specifies the name of the `DocumentDB` CR. You have to specify this name in `spec.version` field of [DocumentDB](/docs/guides/documentdb/concepts/documentdb.md) CR.

We follow this convention for naming DocumentDBVersion CR:

- Name format: `{Original DocumentDB image version}-{modification tag}`

We use official Apache DocumentDB release tar files to build docker images for supporting DocumentDB versions and re-tag the image with v1, v2 etc. modification tag when there's any. An image with higher modification tag will have more features than the images with lower modification tag. Hence, it is recommended to use DocumentDB CR with the highest modification tag to enjoy the latest features.

### spec.version

`spec.version` is a required field that specifies the original version of DocumentDB database that has been used to build the docker image specified in `spec.db.image` field.

### spec.deprecated

`spec.deprecated` is an optional field that specifies whether the docker images specified here is supported by the current KubeDB operator.

The default value of this field is `false`. If `spec.deprecated` is set to `true`, KubeDB operator will skip processing this CRD object and will add a event to the CRD object specifying that the DB version is deprecated.

### spec.db.image

`spec.db.image` is a required field that specifies the docker image which will be used to create PetSet by KubeDB operator to create expected DocumentDB database.


## Next Steps

- Learn about DocumentDB CRD [here](/docs/guides/documentdb/concepts/documentdb.md).
- Deploy your first DocumentDB database with KubeDB by following the guide [here](/docs/guides/documentdb/quickstart/guides/index.md).
Loading
Loading