Couchbase

Detailed information on the Couchbase state store component

Component format

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

  1. apiVersion: dapr.io/v1alpha1
  2. kind: Component
  3. metadata:
  4. name: <NAME>
  5. spec:
  6. type: state.couchbase
  7. version: v1
  8. metadata:
  9. - name: couchbaseURL
  10. value: <REPLACE-WITH-URL> # Required. Example: "http://localhost:8091"
  11. - name: username
  12. value: <REPLACE-WITH-USERNAME> # Required.
  13. - name: password
  14. value: <REPLACE-WITH-PASSWORD> # Required.
  15. - name: bucketName
  16. value: <REPLACE-WITH-BUCKET> # Required.

Warning

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

Spec metadata fields

FieldRequiredDetailsExample
couchbaseURLYThe URL of the Couchbase serverhttp://localhost:8091
usernameYThe username for the database“user”
passwordYThe password for access“password”
bucketNameYThe bucket name to write to“bucket”

Setup Couchbase

You can run Couchbase locally using Docker:

  1. docker run -d --name db -p 8091-8094:8091-8094 -p 11210:11210 couchbase

You can then interact with the server using localhost:8091 and start the server setup.

The easiest way to install Couchbase on Kubernetes is by using the Helm chart:

  1. helm repo add couchbase https://couchbase-partners.github.io/helm-charts/
  2. helm install couchbase/couchbase-operator
  3. helm install couchbase/couchbase-cluster

Last modified July 27, 2022: Remove namespace element from component examples (#2647) (ff9de5c8)