Skip to content

KR.ADMIN INITIALIZE-CLUSTER

Initializes a new Kronotop cluster.

KR.ADMIN INITIALIZE-CLUSTER

None.

Simple string. Returns OK on success.

This command sets up the foundational metadata structures required before a Kronotop cluster can serve traffic. It must be executed exactly once on the management interface (port 3320 by default).

INITIALIZE-CLUSTER is the only KR.ADMIN subcommand that does not require a pre-initialized cluster.

The command creates bucket shards (count defined by bucket.shards). It also provisions shards for the experimental stash subsystem (count defined by stash.shards), which is disabled by default. All shards start as INOPERABLE.

Operators must explicitly set shard status and assign routes before the cluster can accept data.

ErrorCondition
ERR cluster has already been initializedThe cluster has already been initialized.
ERR KronotopDirectory: '<path>' has already been createdA directory created during initialization already exists, indicating a partial or conflicting initialization attempt.

First-time initialization:

127.0.0.1:3320> KR.ADMIN INITIALIZE-CLUSTER
OK

Duplicate initialization:

127.0.0.1:3320> KR.ADMIN INITIALIZE-CLUSTER
(error) ERR cluster has already been initialized