CMS Cluster Reference
A cluster is a set of CMS brokers behind one Kafka bootstrap address, in one
environment. It is deployed as a Cluster resource of cms.camelx.io/v1alpha1,
run by the operator of the environment.
Procedure: Create a Kafka Cluster.
Storage
Where the brokers keep topics, messages and accounts. One of three, chosen at creation and immutable.
| Storage | Fields | Brokers |
|---|---|---|
| S3 | Bucket name, Region, Access key (S3 Credentials), Provider address for an S3 service other than AWS | Any number |
| PostgreSQL | Address, Port, Database name, Credentials (Username and Password) | Any number |
| Local | Keep messages across restarts, and a size: a SQLite file on a disk of that size (a PersistentVolumeClaim with the default storage class), or on an emptyDir volume limited to that size (500Mi without one) | One |
The Cluster Id, under which the store keeps the data of the cluster, is not a field: it is a hash
of the name of the cluster and the kind of its storage (local, s3 or postgres). A cluster
created again with the same name and the same kind of storage, on the same store, finds its topics,
messages and users.
Its messages are lost when the broker restarts. It cannot have SCRAM: the operator refuses accounts that a restart would lose, so the console offers no sign-in, and no users, on it. A local storage has one broker and cannot be autoscaled, kept or not.
Security
| Field | What it does | Default |
|---|---|---|
| Encrypt connections (TLS) | TLS on the Kafka listener | Off |
| Certificate | A TLS Certificate configuration: tls.crt, tls.key and ca.crt | — |
| Clients sign in | SCRAM authentication. Not offered on a local storage not kept across restarts. | Off |
| Sign-in methods | SCRAM-SHA-256, SCRAM-SHA-512 | SCRAM-SHA-512 |
With sign-in, the operator creates the administrator account in the Secret <cluster>-admin. Its
name is a hash of the application and the cluster: it is not a field.
It accepts any client that reaches it, in clear text. The console shows it as Open.
Brokers
| Field | What it is | Default |
|---|---|---|
| Clients create topics | Whether a client may create a topic that is not declared | Off |
The image of the brokers is the platform's: it is not a property of the cluster. Their number is Replicas, in Autoscaling. Brokers write their logs to standard output.
The storage cannot be changed after the creation: the edit panel shows the one chosen, locked.
Deletion Policies
Set with their defaults at creation, and applied when the cluster is deleted.
| Policy | Values | Default |
|---|---|---|
| Messages | Retain keeps the data in the store; Delete removes it. Not offered on a local storage: its data is always deleted with the cluster. | Retain |
| Users and topics | Block refuses the deletion while any remains; Cascade deletes them; Orphan leaves them | Block |
With Block, the console counts the users and the topics of the cluster before it asks for a
confirmation, and says how many are left.
Resources
The CPU and memory of each broker:
| Field | What it is | Default |
|---|---|---|
| Reserved CPU | resources.requests.cpu | 100m |
| Reserved Memory | resources.requests.memory | 128Mi |
| Maximum CPU | resources.limits.cpu | 500m |
| Maximum Memory | resources.limits.memory | 512Mi |
The defaults are those of the smallest broker.
Resources and Autoscaling are tabs next to the overview of the cluster.
Metrics
A cluster has no setting for its metrics. As gateways do, its brokers send them to the collector of the platform, which stores them in Monitoring, from what the cluster belongs to:
spec.telemetry | Value |
|---|---|
endpoint | http://otel-collector.monitoring.svc.cluster.local:4318: OTLP over HTTP, the only protocol of the brokers |
headers.organization | The business unit of the cluster |
headers.stream-name | Its environment |
serviceName | The name of the cluster |
resourceAttributes | service.namespace and deployment.environment, the environment. The operator adds the namespace, the pod, the cluster name and its id. |
The brokers log at the warn level.
Autoscaling
The number of brokers: Replicas (spec.replicas) while Autoscaling is off, or a
HorizontalPodAutoscaler created by the operator once it is on. The fields of the autoscaler show
when it is on.
| Field | What it is | Default |
|---|---|---|
| Replicas | The number of brokers, while autoscaling is off | 1 |
| Autoscaling | Whether the autoscaler sets the number of brokers | Off |
| Fewest servers | minReplicas | 2 |
| Most servers | maxReplicas | 5 |
| CPU target | Average CPU utilization, as a share of the reserved CPU: 50% to 90%, or no target | 80% |
| Memory target | Average memory utilization, as a share of the reserved memory: 50% to 90%, or no target | 80% |
A utilization target needs the matching reservation in Resources, and a metrics server in the cluster. Autoscaling is refused on a local storage.
Status
| State | Pending, Provisioning, Bootstrapping, Ready, Degraded or Deleting |
| Connection address | status.bootstrapServers, as host:port: what clients connect to |
| Conditions | StorageReady, TLSReady, Bootstrapped, BrokersReady, and Ready, which sums them up. Insecure flags a cluster without TLS nor SCRAM, DeletionBlocked a deletion refused by its policy, UpgradePending a new image being rolled out. |