Skip to content

[BUG] Upgrading KubeBlocks from 1.0.3-beta.5 to 1.0.3-beta.15 unexpectedly recreates existing database Pods #10934

Description

@shanshanying

Describe the bug

Upgrading KubeBlocks from 1.0.3-beta.5 to 1.0.3-beta.15 triggers rolling recreation of existing database Pods, even though the database Cluster.spec remains unchanged and no restart operation is requested.

The behavior was observed across multiple clusters in the test environment, including components configured with podUpdatePolicy: PreferInPlace.

To Reproduce

  1. Deploy KubeBlocks 1.0.3-beta.5.
  2. Create database clusters and wait until their components are Running.
  3. Upgrade KubeBlocks to 1.0.3-beta.15 without modifying the existing Cluster specifications or requesting a restart.
  4. Observe InstanceSet reconciliation and database Pod deletion/recreation after the new operator starts.

Expected behavior

An operator-only upgrade should preserve running database Pods when users have not requested workload changes or a restart. Changes to operator-injected Pod configuration should have a backward-compatible migration strategy that avoids an automatic database rollout.

Actual behavior

Existing database Pods are deleted and recreated during reconciliation after the operator upgrade. The observed Cluster generation remains unchanged during this rollout.

This introduces unexpected database restarts and potential availability impact during an operator upgrade.

Additional context

A suspected contributor is #10201, which changes the generated kbagent Pod configuration by:

  • Adding the kubeblocks-role-label DownwardAPI volume.
  • Mounting it at /etc/kubeblocks/pod-metadata.
  • Updating role-probe configuration in KB_AGENT_PROBE.

These changes affect Pod template fields that cannot be updated in place and can trigger recreation despite PreferInPlace.

The upgrade also changes KubeBlocks-managed tools image tags, but image changes alone should not be assumed to explain Pod recreation. A complete before/after InstanceSet template comparison is needed to isolate all contributing changes.

Affected upgrade path: 1.0.3-beta.51.0.3-beta.15.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions