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
.
The easiest way to install MongoDB on Kubernetes is by using the Helm chart:
For example, if installing using the example above, the MongoDB host address would be:
mongo-mongodb.default.svc.cluster.local:27017
Follow the on-screen instructions to get the root password for MongoDB. The username is by default.
Last modified June 23, 2022: