Prerequisites
- Kubernetes cluster (1.19+)
- kubectl CLI configured
- Helm 3.x installed
- At least 3 worker nodes with 8GB+ RAM each
- StorageClass for persistent volumes
Quick Start with Helm
Install Pulsar with default values
Architecture
The Helm chart deploys:- ZooKeeper StatefulSet (3 replicas) - Metadata coordination
- BookKeeper StatefulSet (3 replicas) - Message storage
- Broker Deployment (3 replicas) - Message serving
- Proxy Deployment (optional) - Load balancing
- Services - ClusterIP and LoadBalancer configurations
- Persistent Volumes - For ZooKeeper and BookKeeper data
Production Configuration
Custom Values File
Createpulsar-values.yaml for production settings:
Deploy with Custom Values
Resource Requirements
Minimum Production Setup
| Component | Replicas | CPU | Memory | Storage |
|---|---|---|---|---|
| ZooKeeper | 3 | 1 core | 2 GB | 20 GB |
| BookKeeper | 3 | 2 cores | 4 GB | 50 GB (journal) + 200 GB (ledgers) |
| Broker | 3 | 2 cores | 4 GB | - |
| Proxy | 2 | 1 core | 2 GB | - |
Recommended Production Setup
| Component | Replicas | CPU | Memory | Storage |
|---|---|---|---|---|
| ZooKeeper | 5 | 2 cores | 4 GB | 50 GB |
| BookKeeper | 5+ | 4 cores | 8 GB | 100 GB (journal) + 500 GB (ledgers) |
| Broker | 5+ | 4 cores | 8 GB | - |
| Proxy | 3 | 2 cores | 4 GB | - |
Storage Configuration
StorageClass for BookKeeper
Create separate storage classes for journal (fast SSD) and ledgers (standard):Accessing the Cluster
Port Forwarding (Development)
LoadBalancer (Production)
Configure LoadBalancer service in values:Ingress (HTTP/HTTPS)
Scaling
Scale Brokers
Scale BookKeeper
Horizontal Pod Autoscaling
Monitoring and Observability
Prometheus Integration
The Helm chart includes Prometheus exporters:Grafana Dashboards
Import Pulsar dashboards:Log Aggregation
Use Fluent Bit to collect logs:Security
Enable TLS
Enable Authentication
Upgrading
Check for Updates
Upgrade Pulsar
Rolling Upgrade Strategy
- Upgrade ZooKeeper nodes one by one
- Upgrade BookKeeper nodes one by one
- Upgrade brokers (automatic rolling update)
- Upgrade proxies
Backup and Disaster Recovery
Backup ZooKeeper Data
Backup BookKeeper Ledgers
Use VolumeSnapshot for PersistentVolumes:Troubleshooting
Pod Not Starting
PersistentVolumeClaim Pending
Network Issues
Performance Tuning
Node Affinity
Dedicate nodes for BookKeeper:Pod Disruption Budget
Next Steps
- Configure Multi-Cluster Replication across Kubernetes clusters
- Set up Monitoring with Prometheus and Grafana
- Implement GitOps with ArgoCD or Flux
- Learn about Pulsar Operators for advanced cluster management