MongoDB

To setup MongoDB state store create a component of type . See this guide on how to create and apply a state store configuration.

Warning

The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described here.

If you wish to use MongoDB as an actor store, append the following to the yaml.

You can run MongoDB locally using Docker:

You can then interact with the server using localhost:27017.

If you do not specify a databaseName value in your component definition, make sure to create a database named daprStore.

This installs MongoDB into the default namespace. To interact with MongoDB, find the service with: kubectl get svc mongo-mongodb.

For example, if installing using the example above, the MongoDB host address would be:

mongo-mongodb.default.svc.cluster.local:27017

Last modified September 17, 2021 : Merge pull request #1757 from georgestevens99/1440SecretKeyRefExplanation (620a5f8)