Prerequisites
Before installing AutoMQ with a Helm Chart, ensure the following prerequisites are satisfied:-
Prepare a Kubernetes Environment: Establish an available Kubernetes cluster in advance, ensuring it meets the conditions below:
- Allocate Resources for AutoMQ: It is recommended to allocate 4 cores and 16GB of memory for each AutoMQ Pod. Deploying on a dedicated Node is advisable for stable network throughput performance.
- Storage Plugin: If your Kubernetes is provided by a cloud vendor, it is advisable to install the storage plugin offered by the vendor to manage EBS volume resources effectively.
- Prepare Object Storage Buckets: Each AutoMQ cluster requires two separate object storage buckets: one Ops Bucket for system logs and metrics data, and one Data Bucket for message data. Please refer to the object storage product documentation for guidance on creating them.
- Install the Helm Chart Tool: It is recommended to install version 3.6 or higher. You can refer to the documentation for detailed instructions.
Obtain the Software Chart.
The AutoMQ Software Chart image is published and made available to the public through an Azure Container Registry (East US). You can test the pull with the following command.Install AutoMQ
AutoMQ Software offers two types of WAL storage options: EBSWAL and S3WAL. A comparison of the two storage engines is as follows; it is recommended to choose based on your needs. For detailed principles, please refer to the Technical Architecture.- EBSWAL Mode: WAL storage uses high-speed EBS volumes to deliver low-latency send performance, supported only in public cloud environments like AWS, GCP, and Azure. When using, you need to assign EBS volumes to AutoMQ’s Pods via a StorageClass.
- S3WAL Mode: Deployment is relatively simple, as WAL storage writes directly to object storage, offering sub-100 ms send RT performance. It supports all public cloud environments as well as private data centers (as long as they provide S3-compatible object storage). Deployment is relatively straightforward, with no need to allocate EBS volumes.
Step 1: Create Credentials and Perform Authorization.
AutoMQ clusters require access to external services such as object storage and storage volumes. Therefore, before installation, you need to create credentials for AutoMQ and complete the authorization process.- AWS
- Azure
- OCI
If AutoMQ is deployed in the AWS public cloud environment using AWS S3 storage, you must access the IAM product to create an authorization policy. AutoMQ must be granted permission for the following operations to access AWS S3:If you deploy using the EBSWAL mode, additional authorization for the following policy is required:After creating an IAM authorization policy, credentials can be generated using two methods.
- Using IAM Subaccount Static AccessKey: In this approach, attach the authorization policy to the IAM subaccount and utilize the subaccount’s static AccessKeyId and AccessKeySecret as credentials to access AutoMQ.
- Using IAM Role Dynamic Credentials: For this approach, create an IAM Role and attach the authorization policy to the Role. Dynamic credentials allow access to AutoMQ through a Pod assuming the EC2 Role in EKS.
Step 2: Create Storage Class
Before installing AutoMQ, you must declare a Storage Class in the Kubernetes cluster for allocating storage volumes. These storage volumes serve several purposes:- Storing AutoMQ Controller Metadata: In the AutoMQ cluster, the Controller Pod responsible for metadata management must mount the storage volumes to store KRaft metadata.
- EBSWAL Mode Storage for WAL Data (Optional): If you plan to deploy using the EBSWAL mode, each Broker Pod will also require a mounted data volume for writing WAL data.
- AWS
- Azure
- GCP
- OCI
Step 3: Initialize the Configuration File
The configuration information for the AutoMQ Software Chart is composed of multiple parts, allowing for user customization via the values.yaml file. First, create an empty file namedautomq-values.yaml. You can copy the example configuration below and edit it.
Modify Common Parameters.
global.cloudProvider.name This parameter specifies the deployment cloud environment. Please insert the enumerated value according to the name of the cloud provider. If it is a private data center, you’ll also need to fill it in with the enumerated value.
global.cloudProvider.credentials
This parameter details the public credentials used by the AutoMQ cluster to access cloud resources. The current example utilizes static credentials of the AccessKey type. To use the IAM Role method, please refer to the advanced parameter documentation for guidance on modifications.
- AWS
- Azure
- Google Cloud
- OCI
- Alibaba Cloud
Fill in the Ops Bucket and Data Bucket created in the prerequisites according to your actual scenario.
Set LoadBalancer Annotations to Enable External Kubernetes Cluster Access
If you need to access AutoMQ from outside the Kubernetes cluster, you need to enableexternalAccess. To configure an internal LoadBalancer, you should modify the values.yaml file, specifically the externalAccess.controller.service.loadBalancerAnnotations section, and add the following annotations based on your cloud provider:
- AWS
- Azure
- GCP
- OCI
To create an internal Network Load Balancer (NLB), add the following annotations:
Revise the Cluster Topology and Resource Request Parameters.
Adjust the cluster topology and resource request parameters based on the resources allocated to AutoMQ Node. The parameters that need modification are as follows: broker.replicas The AutoMQ Software Chart will start with three Controller Pods by default. These Controller Pods also provide data read and write capabilities. If users wish to horizontally scale more Brokers, they can set the broker.replicas parameter.- Default value: 0, which represents a three-node cluster without the need for additional Brokers.
- Setting range: >= 0, configured as needed.
- controller.resources.requests.cpu
- controller.resources.requests.memory
- controller.resources.limits.cpu
- controller.resources.limits.memory
- controller.env.[KAFKA_HEAP_OPTS]
- broker.resources.requests.cpu
- broker.resources.requests.memory
- broker.resources.limits.cpu
- broker.resources.limits.memory
- broker.env.[KAFKA_HEAP_OPTS]
Step 4: Install Chart and Access the Cluster
After customizing the values.yaml configuration file to suit your deployment requirements, proceed with the installation of AutoMQ.Step 5: Connect and Test the Cluster
Headless Service
- Locate the Headless service
- Connecting and Testing Using Kafka Clients
--bootstrap-server option to send and receive messages. Here’s the command you can use:
LoadBalancer
- Find External Address
- Connect and Test Using Kafka Clients
9092 is used for client access.
Other Advanced Configurations
The deployment document above provides a basic example of deploying AutoMQ in S3WAL mode. In real-world production environments, users can choose more advanced configurations like EBSWAL and integrate Auto-Scaler support. For the full configuration file, refer to Helm Chart Values Readme▸.Configuring the WAL Type
In the previously mentioned installation steps, S3WAL was used as an example. AutoMQ supports deployment options for both EBSWAL and S3WAL modes.- S3WAL Mode
- EBSWAL Mode
In S3WAL mode, there’s no need to mount a WAL data volume, making the configuration relatively straightforward. First, configure the Then, disable
global.config.s3.wal.path parameter.controller.persistence.wal.enabled and broker.persistence.wal.enabled.Setting Credentials
AutoMQ supports accessing external resources using either static AccessKeys or dynamic IAM Roles. To prevent the leakage of static AccessKey configurations in production environments, it is recommended to use dynamically generated credentials provided by the cloud provider’s IAM Roles.- IAM Role Credentials
- AccessKey Credentials
When using IAM Role Credentials, it is necessary to attach the authorization policy to the Role in Step 1. Then, refer to the example below to modify the Credentials configuration.The format for filling out credentials parameters is outlined in the following table:**
Set Fine-grained Scheduling Policies
In Kubernetes, AutoMQ’s fine-grained scheduling policy is implemented using node affinities and tolerations. Users are advised to customize label matching rules based on their node types:Tolerations
It’s recommended to add a taint to the Kubernetes node group with the key “dedicated,” operator “Equal,” value “automq,” and effect “NoSchedule.” Then, configure the corresponding toleration rules in global.tolerations to schedule Pods:Node Affinities
Override default values in the controller/agent configuration to align with node labels (e.g., node-type: automq-worker):Set up Auto-scaling
Number of Controllers
By default, the cluster deploys 3 Controller Pods, but users can customize the number of Controller replicas.Note: Once the cluster is deployed, adjusting the number of Controller replicas is not supported to avoid unforeseen risks.
Number of Brokers
The number of brokers is managed by thebroker.replicas parameter, which allows for horizontal scaling. By default, there are 0 brokers.
Auto-scaling Configuration
By default, HPA (Horizontal Pod Autoscaler) is disabled. To activate it, two conditions must be fulfilled:- broker.replicas > 0
-
Enable and configure parameters in
global.autoscaling.hpa:
Identity Recognition Configuration
AutoMQ allows overriding of protocol listeners and enabling secure authentication. By default, it uses the following ports:- Client to server access: 9092 (PLAINTEXT).
- Internal communication between Controllers: 9093 (PLAINTEXT).
- Internal communication between Brokers: 9094 (PLAINTEXT).
Configure Prometheus RemoteWrite Metrics Integration
AutoMQ Server supports pushing cluster metrics directly to a user-defined Prometheus instance via the Prometheus RemoteWrite protocol. This approach eliminates the need to deploy additional Prometheus scraping components in the Kubernetes cluster, simplifying the monitoring architecture. Configure thes3.telemetry.metrics.exporter.uri parameter in global.config within your values.yaml to enable this feature. Choose the appropriate configuration format based on your Prometheus endpoint’s authentication method:
- No Auth
- Basic Auth
- Bearer Token
- AWS SigV4
For Prometheus endpoints that do not require authentication:
Security and Access Control
AutoMQ supports multiple security configurations to protect your data in transit and control client access. This section covers the two primary security models for client authentication when deploying with the Helm chart:SASL_SSL and SSL (mutual TLS).
These two paths are mutually exclusive. Choose the one that aligns with your organization’s security policies.
The Helm values
tls.keystorePassword and tls.truststorePassword are used only when loading JKS/PKCS12 keystores. For PEM-based deployments (the default when tls.type=PEM or certificates are auto-generated) the chart mounts the PEM files directly, so these passwords are typically left blank unless your private key itself is protected.Path 1: Configuring SASL_SSL Authentication
This is a common security model where clients authenticate using a username and password, and the communication channel is encrypted with TLS.Step 1: Configure values.yaml for SASL_SSL
You need to define a SASL_SSL listener, enable ACLs, and configure SASL users and their passwords. The server will present a TLS certificate to clients, but clients do not need their own certificate to authenticate.
Example values.yaml configuration:
Step 2: Post-Deployment ACL Management
After deploying the cluster, you must use the superuser (_automq) to grant permissions to regular users like my-user.
-
Configure an Admin Client (
superuser.properties): This file allows you to run admin tools by authenticating as_automq. -
Grant Permissions:
Use
kafka-acls.shwith the admin configuration to grantWRITEandREADpermissions tomy-user.
Step 3: Client Configuration
A regular application client (my-user) would use the following configuration. The client only needs to trust the server, which can be done by providing the CA certificate in a PEM file or a JKS truststore.
Example using PEM Truststore:
Path 2: Configuring SSL (mTLS) Authentication
In this model, clients authenticate by presenting a TLS certificate that is trusted by the cluster. This is known as mutual TLS (mTLS).Step 1: Prepare Certificates
You will need a hierarchy of certificates:- Server Certificate: For the AutoMQ brokers.
- Admin Client Certificate: A certificate with a specific Common Name (e.g.,
CN=automq-admin) for an administrator who will be designated as a superuser. - Application Client Certificate: A unique certificate for each client application (e.g.,
CN=my-app).
Step 2: Configure values.yaml for mTLS
You need to define an SSL listener, require client authentication, and set the admin certificate’s principal as the superuser.
Example values.yaml configuration:
Step 3: Post-Deployment ACL Management
After deployment, use the admin certificate to grant permissions to regular application principals.-
Configure an Admin Client (
admin.properties): This file uses the admin certificate (CN=automq-admin) to authenticate. Example using PEM files (Recommended):Example using JKS files: -
Grant Permissions:
Use
kafka-acls.shto grant permissions to the application principalUser:CN=my-app.
Step 4: Client Configuration
A regular application client would use its own unique certificate (CN=my-app) to connect.
Example using PEM files (Recommended):