Skip to main content

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.

StorageFieldsBrokers
S3Bucket name, Region, Access key (S3 Credentials), Provider address for an S3 service other than AWSAny number
PostgreSQLAddress, Port, Database name, Credentials (Username and Password)Any number
LocalKeep 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.

A local storage not kept is for development

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​

FieldWhat it doesDefault
Encrypt connections (TLS)TLS on the Kafka listenerOff
CertificateA TLS Certificate configuration: tls.crt, tls.key and ca.crt—
Clients sign inSCRAM authentication. Not offered on a local storage not kept across restarts.Off
Sign-in methodsSCRAM-SHA-256, SCRAM-SHA-512SCRAM-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.

A cluster without TLS nor SCRAM is open

It accepts any client that reaches it, in clear text. The console shows it as Open.

Brokers​

FieldWhat it isDefault
Clients create topicsWhether a client may create a topic that is not declaredOff

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.

PolicyValuesDefault
MessagesRetain 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 topicsBlock refuses the deletion while any remains; Cascade deletes them; Orphan leaves themBlock

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:

FieldWhat it isDefault
Reserved CPUresources.requests.cpu100m
Reserved Memoryresources.requests.memory128Mi
Maximum CPUresources.limits.cpu500m
Maximum Memoryresources.limits.memory512Mi

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.telemetryValue
endpointhttp://otel-collector.monitoring.svc.cluster.local:4318: OTLP over HTTP, the only protocol of the brokers
headers.organizationThe business unit of the cluster
headers.stream-nameIts environment
serviceNameThe name of the cluster
resourceAttributesservice.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.

FieldWhat it isDefault
ReplicasThe number of brokers, while autoscaling is off1
AutoscalingWhether the autoscaler sets the number of brokersOff
Fewest serversminReplicas2
Most serversmaxReplicas5
CPU targetAverage CPU utilization, as a share of the reserved CPU: 50% to 90%, or no target80%
Memory targetAverage memory utilization, as a share of the reserved memory: 50% to 90%, or no target80%

A utilization target needs the matching reservation in Resources, and a metrics server in the cluster. Autoscaling is refused on a local storage.

Status​

StatePending, Provisioning, Bootstrapping, Ready, Degraded or Deleting
Connection addressstatus.bootstrapServers, as host:port: what clients connect to
ConditionsStorageReady, 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.

See also​