Skip to main content

Cluster stuck in updating: pods missing a role label

Symptoms

  • The Cluster resource stays in phase Updating after all pods are Running and ready.
  • One or more pods have no value in the kubeblocks.io/role label while their peers show primary or secondary:

Diagnosis

  1. Confirm the database itself is healthy. For a sharded cluster, each shard -0 pod should report master and cluster_state:ok:
    For standalone, replicated, or Sentinel topologies, use the falkordb container name instead of falkordb-cluster.
  2. Check that the role probe ran on the affected pod. The kbagent sidecar logs the probed role:
    A healthy probe logs "output": "primary" (or secondary).
  3. Check the KubeBlocks controller for a failed label update:
    The signature of this case is an event reconcile error such as:

Root cause

The kbagent role probe reports the role once and re-emits it only when the role changes. If the KubeBlocks event controller loses an optimistic-concurrency conflict while writing the kubeblocks.io/role pod label (common during post-provision churn, when several controllers update the same pod), the write is dropped and never retried. The database is healthy; only the label is missing, which keeps the Cluster in Updating.

Fix

Apply the label the controller failed to write, matching the actual role reported by the database in the diagnosis step:
The Cluster transitions to Running as soon as all pods carry a role label:
Alternatively, deleting the affected pod also resolves it: the replacement pod is probed fresh and labeled on startup. Prefer re-labeling, since it avoids a failover and is instantaneous.
Only set the label to the role the database actually reports. Labeling a replica as primary misroutes client traffic sent through the read-write Service.