Create a Kafka Cluster
Create a CMS cluster on S3 or PostgreSQL, with TLS and SCRAM, then a user and a topic for a first client.
Use cases
- Give the integrations of an environment a Kafka cluster that survives the restart of its brokers.
- Replace a development cluster on a local storage not kept by one whose messages are kept.
Prerequisites
- The Camel Messaging Service is active in the environment.
- For S3: a bucket, its region, and an S3 Credentials configuration made available to the environment.
- For PostgreSQL: a database, and a Username and Password configuration with its user name and password.
- For TLS: a TLS Certificate configuration holding the certificate of the brokers, its key and the authority that signed it.
Procedure
- Choose the environment at the top of the page, then open Camel Messaging › Clusters and click Create cluster.
- Storage. Choose S3, PostgreSQL or Local. The storage of a cluster cannot be changed afterwards. With Local, the next step asks whether the messages are kept across restarts, on a disk of the size chosen.
- Settings. Give the name of the cluster, fill the fields of the storage, then under Security turn on Encrypt connections (TLS) and pick the certificate, and turn on Clients sign in.
- Click Create cluster. The page of the cluster opens, and says that it was created.
- Click Apply changes to deploy it in the environment.
- On the Users tab, Create user, then Apply changes on the page of the user.
- On the Topics tab, Create topic, then Apply changes on the page of the topic.
Parameters
| Field | What it is |
|---|---|
| Name | The name of the Cluster resource. Users and topics refer to it. |
| Bucket name, Region | The S3 bucket every broker reads and writes. |
| Access key | An S3 Credentials configuration. |
| Provider address | The endpoint of an S3 service other than AWS. |
| Address, Port, Database name | The PostgreSQL database every broker reads and writes. |
| Credentials | A Username and Password configuration: the user name and password of the database. |
| Encrypt connections (TLS), Certificate | TLS on the Kafka listener, with a TLS Certificate configuration. |
| Keep messages across restarts, Disk size | Local: a disk of that size, or a temporary directory limited to it. Sign-in needs the disk. |
| Clients sign in | SCRAM authentication. The operator creates the administrator account. |
| Messages, Users and topics | The deletion policies of the cluster. |
Topic auto-creation is set afterwards, with Edit on the page of the cluster, and the number of brokers in its Autoscaling tab. The broker image and the data identifier are not fields.
Verification
- The Properties block of the cluster shows the state
Ready, and the conditionsStorageReady,TLSReady,BrokersReadyandReadyare true. - The Service block shows the Connection address: the bootstrap server of the cluster.
- The user shows a Connection configuration: the Secret a client connects with.
Behavior and limits
- The storage and the data identifier of a cluster are immutable.
- A cluster on a local storage has one broker; not kept across restarts, it loses its messages when that broker restarts, and has no sign-in nor users.
- A local storage is deleted with its cluster.
- A cluster with SCRAM starts a temporary broker without authentication while it creates its administrator: a NetworkPolicy keeps it to the namespace of the operator, which needs a CNI that enforces NetworkPolicies.
- Deleting a cluster that still has users or topics is refused, unless its deletion policy says otherwise.