Backends

As explained in the Overview, when Kuma (kuma-cp) is up and running it needs to store data somewhere. The data will include the state, the policies configured, the data-planes status, and so on.

Kuma supports a few different backends that we can use when running kuma-cp. You can configure the backend storage by setting the KUMA_STORE_TYPE environment variable when running the control plane.

This information has been documented for clarity, but when following the installation instructions these settings will be automatically configured.

The backends are:

  • memory (default): Kuma stores all the state in-memory. This means that restarting Kuma will delete all the data. Only reccomend when playing with Kuma locally. For example:
  1. $ KUMA_STORE_TYPE=memory kuma-cp run

This is the default memory store if KUMA_STORE_TYPE is not being specified.

  • postgres: Kuma stores all the state in a PostgreSQL database. Used when running in Universal mode. You can also use a remote PostgreSQL database offered by any cloud vendor. For example:
  1. $ KUMA_STORE_TYPE=postgres \
  2. KUMA_STORE_POSTGRES_HOST=localhost \
  3. KUMA_STORE_POSTGRES_PORT=5432 \
  4. KUMA_STORE_POSTGRES_USER=kuma-user \
  5. KUMA_STORE_POSTGRES_PASSWORD=kuma-password \
  6. KUMA_STORE_POSTGRES_DB_NAME=kuma \
  7. kuma-cp run
  • kubernetes: Kuma stores all the state in the underlying Kubernetes cluster. User when running in Kubernetes mode. For example:
  1. $ KUMA_STORE_TYPE=kubernetes kuma-cp run