Kafka Kubernetes Setup
This skill deploys Apache Kafka on Kubernetes using the Bitnami Helm chart and verifies its readiness. It handles namespace creation, chart installation, pod readiness checks, and returns a pass/fail status — making it easy to add Kafka to any Kubernetes cluster in one step.
Use this skill at infrastructure setup time before deploying event-driven services that produce or consume Kafka topics.
Quick Start
# Deploy Kafka to the default 'kafka' namespace
/kafka-k8s-setup
# Deploy to a custom namespace
/kafka-k8s-setup namespace=data-platform replicas=3
Expected output: Done — Kafka ready in namespace kafka or Error — <reason>.
Key Features
- Creates a dedicated Kubernetes namespace for Kafka isolation
- Installs the Bitnami Kafka Helm chart with configurable replica count
- Performs
kubectl rollout statusto confirm pod readiness before finishing - Returns minimal status output to preserve context window
- Supports custom
values.yamloverrides for production tuning
Process
- Deploy Kafka using the Bitnami Helm chart
- Verify pod status and readiness
- Report minimal status information
The deployment is handled by the supporting scripts which create the namespace, install the chart, and verify via kubectl.
When NOT to Use This Skill
- Managed Kafka services (Confluent Cloud, AWS MSK, Azure Event Hubs) — use their native CLI tools; this skill is for self-hosted clusters only
- Local development — use
docker-composewith the Bitnami Kafka image; Kubernetes is overkill for a single developer - Clusters without Helm — the skill depends on Helm v3; install it first or use the
k8s-foundationskill
Common Mistakes
- Not setting
persistence.enabled=truein production — default ephemeral storage loses all messages when pods restart - Using the default single-replica config in production — a single Kafka broker has no fault tolerance
- Forgetting to open firewall/network policy ports (9092 for clients, 9093 for inter-broker) — producers and consumers silently fail to connect