Overview
Clusters represent physical Pulsar deployments in different data centers or regions. The Clusters API allows you to create, configure, and manage cluster settings including service URLs, replication, and namespace isolation policies. Base Path:/admin/v2/clusters
List Clusters
Get the list of all Pulsar clusters.Response
Set of cluster names (excludes the “global” cluster)
Example
Response Example
Get Cluster Configuration
Retrieve the configuration for a specific cluster.Path Parameters
The cluster name
Response
HTTP service URL for the broker
HTTPS service URL for the broker
Pulsar protocol URL for the broker
Pulsar protocol URL with TLS
List of peer cluster names for replication
Example
Response Example
Create Cluster
Create a new cluster with the specified configuration.Path Parameters
The cluster name to create. Cannot contain ’/’ characters.
Request Body
HTTP service URL (e.g., http://broker.example.com:8080)
HTTPS service URL (e.g., https://broker.example.com:8443)
Binary protocol URL (e.g., pulsar://broker.example.com:6650)
Binary protocol URL with TLS (e.g., pulsar+ssl://broker.example.com:6651)
List of peer clusters for replication
Example
Response Codes
| Code | Description |
|---|---|
| 200 | Cluster created successfully |
| 400 | Bad request (invalid URL format) |
| 403 | Don’t have super-user privileges |
| 409 | Cluster already exists |
| 412 | Cluster name is not valid |
| 500 | Internal server error |
Update Cluster
Update an existing cluster’s configuration.Path Parameters
The cluster name to update
Request Body
HTTP service URL
HTTPS service URL
Binary protocol URL
Binary protocol URL with TLS
Updated list of peer clusters
Example
Response Codes
| Code | Description |
|---|---|
| 204 | Cluster updated successfully |
| 403 | Don’t have super-user privileges |
| 404 | Cluster doesn’t exist |
| 412 | Invalid configuration |
Delete Cluster
Delete a cluster.Path Parameters
The cluster name to delete
Example
Response Codes
| Code | Description |
|---|---|
| 204 | Cluster deleted successfully |
| 403 | Don’t have super-user privileges |
| 404 | Cluster doesn’t exist |
| 412 | Cluster has active tenants |
Namespace Isolation Policies
Namespace isolation policies allow you to dedicate specific brokers to certain namespaces.Create Namespace Isolation Policy
Path Parameters
The cluster name
Name for the isolation policy
Request Body
List of namespace patterns (regex supported)
Primary broker patterns
Secondary broker patterns
Auto-failover configuration
Example
Get Namespace Isolation Policies
Delete Namespace Isolation Policy
Failure Domains
Failure domains group brokers for rack-aware placement.Create Failure Domain
Request Body
List of broker names in this domain
Example
Get Failure Domains
Delete Failure Domain
Best Practices
Cluster Setup
- Use descriptive cluster names (e.g., region-based)
- Configure both HTTP and binary protocol URLs
- Always set up TLS URLs for production
- Document cluster locations and purposes
Multi-Region Deployment
- Create separate clusters for each region
- Configure peer clusters for geo-replication
- Use failure domains for rack awareness
- Monitor cross-cluster latency
Namespace Isolation
- Isolate critical workloads on dedicated brokers
- Use regex patterns for flexible namespace matching
- Configure appropriate failover policies
- Monitor broker utilization
High Availability
- Deploy multiple brokers per cluster
- Configure failure domains across racks/zones
- Set up automatic failover policies
- Test disaster recovery procedures
Related Resources
Tenants API
Assign tenants to clusters
Brokers API
Monitor and manage broker nodes