The documentation you are viewing is for Dapr v1.8 which is an older version of Dapr. For up-to-date documentation, see the latest version.
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.
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <NAME>
spec:
type: state.couchbase
version: v1
metadata:
- name: couchbaseURL
value: <REPLACE-WITH-URL> # Required. Example: "http://localhost:8091"
- name: username
value: <REPLACE-WITH-USERNAME> # Required.
- name: password
value: <REPLACE-WITH-PASSWORD> # Required.
- name: bucketName
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
Field | Required | Details | Example |
---|---|---|---|
couchbaseURL | Y | The URL of the Couchbase server | "http://localhost:8091" |
username | Y | The username for the database | "user" |
password | Y | The password for access | "password" |
bucketName | Y | The bucket name to write to | "bucket" |
Setup Couchbase
You can run Couchbase locally using Docker:
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:
helm repo add couchbase https://couchbase-partners.github.io/helm-charts/
helm install couchbase/couchbase-operator
helm install couchbase/couchbase-cluster
Related links
- Basic schema for a Dapr component
- Read this guide for instructions on configuring state store components
- State management building block
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
Last modified July 27, 2022: Remove namespace element from component examples (#2647) (ff9de5c8)