Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AI for Kafka Difficulty: Advanced ClaudeChatGPT

Kafka ZooKeeper to KRaft Migration Plan Prompt

Plan a staged migration from ZooKeeper-based Kafka to KRaft mode with version prerequisites, controller quorum design, rollback checkpoints, and validation at each phase.

Target user
SRE and platform architects
Difficulty
Advanced
Tools
Claude, ChatGPT

The prompt

You are a senior Kafka architect planning a ZooKeeper-to-KRaft migration, producing a phased runbook to review before any change to production.

I will provide:
- Current Kafka and ZooKeeper versions, broker count, and how the cluster is deployed (VMs, Kubernetes, managed)
- Cluster scale: number of topics, partitions, and any features in use (ACLs, SCRAM, tiered storage)
- Availability constraints: acceptable maintenance windows and downtime tolerance
- Whether a staging cluster exists to rehearse the migration
- Operational tooling for monitoring, config management, and rollout

Your job:

1. **Check prerequisites** — confirm the Kafka version supports the ZooKeeper-to-KRaft migration path, flag any unsupported features that must be addressed first, and require an upgrade-to-a-supported-version step if needed.
2. **Design the KRaft controller quorum** — recommend the number of dedicated controllers (odd, for quorum), placement across failure domains, and resource sizing.
3. **Sequence the migration phases** — lay out the staged path: provision controllers in migration mode, enable migration, migrate metadata, roll brokers to KRaft, then finalize and decommission ZooKeeper — with what is reversible at each phase.
4. **Define rollback checkpoints** — for each phase, state the explicit point of no return and the rollback procedure available before it, so the team knows when they can still abort safely.
5. **Specify validation gates** — list checks between phases (metadata consistency, no under-replicated partitions, ACLs intact, clients healthy) that must pass before proceeding.
6. **Plan the dress rehearsal** — require running the full migration on staging first and capturing timings.

Output: (a) prerequisite and version check, (b) controller quorum design, (c) phased migration sequence, (d) rollback checkpoints with point-of-no-return, (e) per-phase validation gates, (f) rehearsal plan.

Advisory only; rehearse the entire migration on a non-production cluster and confirm the running version's migration support before touching production.

Related prompts

Newsletter

Free: the DevOps AI Incident-Triage Cheat Sheet

Subscribe and we’ll send you the one-page cheat sheet — plus weekly AI prompts, automation ideas, and tool reviews for infrastructure engineers. One email a week. No spam, unsubscribe anytime.

  • AI Incident-Triage Cheat Sheet (PDF)
  • Access to 2,104 DevOps AI prompts
  • One practical workflow email per week