kubeblocks-rebuild-replica

Rebuild failed MySQL or PostgreSQL replicas in KubeBlocks clusters via RebuildInstance OpsRequest.

3|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/apecloud/kubeblocks-skills --skill kubeblocks-rebuild-replica
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: kubeblocks-rebuild-replica
Source: https://github.com/apecloud/kubeblocks-skills/tree/main/skills/kubeblocks-rebuild-replica
Command: npx skills add https://github.com/apecloud/kubeblocks-skills --skill kubeblocks-rebuild-replica

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Recovery when a replica is unrecoverable and normal failover is insufficient; provides a guided RebuildInstance workflow for MySQL and PostgreSQL clusters in KubeBlocks.

Core Features & Use Cases

  • Identify the failed replica and its role within the cluster.
  • Choose rebuild source (From primary or From backup) and generate an OpsRequest.
  • Apply RebuildInstance and monitor status until completion.
  • Verify replication health and pod readiness post-rebuild.
  • Use for recovery scenarios where planned switchover or full restore is not suitable.

Quick Start

Create and apply a RebuildInstance OpsRequest for the affected replica, then monitor its status until it reports success.

Frequently Asked Questions about kubeblocks-rebuild-replica

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I rebuild a failed replica in a KubeBlocks MySQL or PostgreSQL cluster?▼

Use a RebuildInstance OpsRequest to rebuild a failed KubeBlocks replica by selecting a rebuild source, applying the request, and monitoring status until the replica successfully rejoins the cluster.

When should I use RebuildInstance instead of a planned switchover or full restore?▼

Use RebuildInstance when a replica is unrecoverable and normal failover is insufficient, making planned switchover or full cluster restore inappropriate for the specific failed pod recovery scenario.

Can I choose where to rebuild a failed PostgreSQL replica from in KubeBlocks?▼

Yes, you can rebuild a failed PostgreSQL or MySQL replica by choosing a rebuild source from either the primary instance or an existing backup before generating and applying the OpsRequest.

Does the KubeBlocks replica rebuild workflow include safety checks before applying changes?▼

Yes, the workflow includes safety checks and dry-run capability, allowing you to validate the RebuildInstance OpsRequest and verify the outcome before applying changes to the production cluster.

How do I verify replication health after rebuilding a MySQL replica?▼

After applying RebuildInstance, monitor the OpsRequest status until success, then verify pod readiness and confirm replication health to ensure the rebuilt MySQL replica is fully operational.