New to KubeVault? Please start here.
CouchDB
In the CouchDB storage backend, Vault data will be stored in Apache CouchDB. Vault documentation for the CouchDB storage backend can be found here.
spec.backend.couchdbis only available on thekubevault.com/v1alpha2VaultServerAPI. CouchDB has nohaEnabledfield and cannot be used to run Vault in high availability mode.
apiVersion: kubevault.com/v1alpha2
kind: VaultServer
metadata:
name: vault-with-couchdb
namespace: demo
spec:
version: "2.0.0"
replicas: 1
backend:
couchdb:
endpoint: "https://couchdb.demo.svc:5984/vault"
credentialSecretRef:
name: couchdb-cred
spec.backend.couchdb
To use CouchDB as backend storage in Vault, specify spec.backend.couchdb in the VaultServer CRD.
spec:
backend:
couchdb:
endpoint: <database_url>
credentialSecretRef:
name: <secret_name>
databaseRef:
name: <appbinding_name>
namespace: <appbinding_namespace>
database: <database_name>
maxParallel: <max_parallel>
Here, we are going to describe the various attributes of the spec.backend.couchdb field.
couchdb.endpoint
couchdb.endpoint specifies the full URL to the CouchDB database to use, including the database name. The database must already exist; Vault does not create it. This is required unless databaseRef is set, in which case the endpoint is generated from the referenced AppBinding instead.
spec:
backend:
couchdb:
endpoint: "https://couchdb.demo.svc:5984/vault"
couchdb.databaseRef
couchdb.databaseRef is an optional field that references the AppBinding of a CouchDB database. When set, the endpoint is generated as <appbinding url>/<database>, and, if credentialSecretRef is not set, the credentials are taken from the AppBinding.
spec:
backend:
couchdb:
databaseRef:
name: couchdb-appbinding
namespace: demo
couchdb.database
couchdb.database is an optional field that specifies the name of the CouchDB database to store data in. It is only used with databaseRef. The database must already exist; neither Vault nor the KubeVault operator creates it. Defaults to vault.
spec:
backend:
couchdb:
database: "vault"
couchdb.credentialSecretRef
couchdb.credentialSecretRef is an optional field that specifies the name of the Secret, in the same namespace as the VaultServer, containing the CouchDB username and password to connect with. The secret contains the following keys:
usernamepassword
spec:
backend:
couchdb:
credentialSecretRef:
name: couchdb-cred
couchdb.maxParallel
couchdb.maxParallel is an optional field that specifies the maximum number of concurrent requests to CouchDB.
spec:
backend:
couchdb:
maxParallel: 128








