Skip to main content
Version: 25.4.0

Internal KVDB for Portworx CSI

The built-in internal KVDB is enabled by default when you install Portworx CSI through Portworx Central. Portworx CSI automatically deploys the internal KVDB cluster and manages the internal key-value store cluster. The internal KVDB is installed on a set of three nodes in your cluster, and it removes the requirement for an external KVDB.

Internal KVDB requires a dedicated drive to store its data. PX-CSI automatically creates a 32 GB KVDB drive or file system across three nodes based on the backend storage. The following table explains how Portworx determines where to place KVDB:

Backend storageKVDB placement
Only FlashArrayFlashArray
Only FlashBladeFlashBlade
FlashArray and FlashBladeFlashArray

Note that if you add FlashArray storage to a FlashBlade-only setup, any new KVDB member creates a KVDB drive on the FlashArray.

By default, on FlashBlade-only installs, the NFS version is NFSv4.1. If you want to use a different NFS version, update the spec.cloudStorage.kvdbDeviceSpec field in the StorageCluster during installation.

For example:

spec:
image: portworx/oci-monitor:25.4.0
imagePullPolicy: Always
kvdb:
internal: true
cloudStorage:
kvdbDeviceSpec: "mountOptions=vers=3;size=64"

Topology for KVDB

Similar to CSI topology, you can control the zone where the KVDB is created. You can enable this by setting the environment variable PURE_TOPOLOGY_ENABLED to true in the StorageCluster. When enabled, this uses the zone topology label defined in the pure.json file and on the nodes.

(Optional) Label the nodes before installing Portworx CSI

If you want to control where KVDB is placed, you can use the following command to label nodes in Kubernetes. This command will designate them for the internal KVDB cluster:

kubectl label nodes <list-of-node-names> px/metadata-node=true

Here are a few scenarios based on the labels and their values:

  • If a node is labeled px/metadata-node=true, it becomes part of the internal KVDB cluster.
  • If a node is labeled px/metadata-node=false, it will not be part of the internal KVDB cluster.
  • If no node labels are found, all storage nodes have the potential to run the internal KVDB
  • If an incorrect label is present on the node, such as px/metadata-node=px-test, Portworx will not start KVDB on that node.
  • If no node is labeled as px/metadata-node=true, but one node is labeled as px/metadata-node=false, that specific node will never be part of the KVDB cluster, whereas the remaining nodes are potential internal KVDB nodes.