Create a Kafka service
Learn how to create an Apache Kafka® service on Aiven. You can choose between two Kafka modes and deploy to either Aiven cloud or your own cloud infrastructure.
Choose your Kafka mode
Aiven offers two ways to run Apache Kafka:
-
Inkless: Runs Apache Kafka 4.x with diskless topics and tiered storage enabled by default.
- On Aiven cloud, compute is usage-based and measured in Aiven Kafka Units (AKUs).
- On Bring Your Own Cloud (BYOC), pricing is plan-based. Inkless availability depends on the selected cloud provider.
-
Classic Kafka: Uses fixed plans with local broker storage. Stores topic data on local disks by default, with optional tiered storage.
Prerequisites
- Console
- CLI
- Terraform
- Access to the Aiven Console
- An Aiven project where you can create services
Create an Inkless service on Aiven cloud
Inkless on Aiven cloud uses Aiven Kafka Units (AKUs) to size compute capacity. It runs Kafka 4.x and enables diskless topics and tiered storage by default.
- Console
- CLI
-
In the Aiven Console, open your project and click Services.
-
Click Create service.
-
Select Apache Kafka®.
-
Select Inkless as the service type.
-
Select Aiven cloud as the deployment mode.
noteInkless on Aiven cloud is available only on selected cloud providers. If Inkless is not supported in the selected cloud or region, Classic Kafka is used instead.
-
Select a cloud provider and region.
-
In Stream load, estimate the expected ingress and egress throughput. This estimate is used to determine the initial number of AKUs and estimate costs, and it can be adjusted later.
-
In Retention, enter the data retention period. Retention is used to estimate storage costs and can be adjusted after service creation.
-
In Service basics, enter:
- Name: Enter a name for the service.
important
You cannot change the name after creation.
- Tags: Optional. Add resource tags to organize your services.
- Name: Enter a name for the service.
-
Review the Service summary, and click Create service.
Create an Inkless Kafka service using the Aiven CLI:
avn service create SERVICE_NAME \
--project PROJECT_NAME \
--service-type kafka \
--cloud CLOUD_REGION \
--plan INKLESS_PLAN
Parameters:
SERVICE_NAME: Name of the Kafka service.PROJECT_NAME: Project that contains the service.CLOUD_REGION: Cloud region to deploy the service in.INKLES_PLAN: An Inkless Kafka plan available for the selected cloud and account. Plan availability depends on the selected cloud provider and account.
Create an Inkless service on Bring your own cloud (BYOC)
Inkless services can run in your cloud account through BYOC. Inkless on BYOC uses Kafka 4.x and enables diskless topics and tiered storage by default.
- Console
- CLI
- In the Aiven Console, open your project and click Services.
- Click Create service.
- Select Apache Kafka®.
- Select Inkless as the service type.
- Select Bring your own cloud (BYOC) as the deployment mode.
- In the Cloud section, choose your BYOC environment and region.
- Choose a plan.
- In Service basics, enter:
- Name: Enter a name for the service.
important
You cannot change the name after creation.
- Tags: Optional. Add resource tags to organize your services.
- Name: Enter a name for the service.
- Review the Service summary, and click Create service.
Use the Aiven CLI to create the service.
avn service create SERVICE_NAME \
--project PROJECT_NAME \
--service-type kafka \
--cloud CUSTOM_CLOUD_REGION \
--plan INKLESS_PLAN
Parameters:
SERVICE_NAME: Name of the Kafka service.PROJECT_NAME: Aiven project name.CUSTOM_CLOUD_REGION: BYOC cloud region, such ascustom-aws-eu-central-1.INKLESS_PLAN: Inkless plan, for examplebusiness-8-inkless.
Create a Classic Kafka service on Aiven cloud
Classic Kafka uses fixed plans and local broker storage. It stores topic data on local disks by default, with optional tiered storage.
- Console
- CLI
- Terraform
-
In the Aiven Console, open your project and click Services.
-
Click Create service.
-
Select Apache Kafka®.
-
Select Classic Kafka as the service type.
-
Select Aiven cloud as the deployment mode.
-
In the Cloud section:
- Choose a cloud provider.
- Select a region.
-
In the Plan section, choose a plan from the available plan groups.
-
Optional:
- Add disk storage.
- Enable Tiered storage if supported for your plan and region.
-
In Service basics, enter:
- Name: Name of the service.
- Version: Select the Kafka version. The latest supported version appears by default.
- Tags: Optional. Add resource tags to organize your services.
-
Review the Service summary, then click Create service.
Create a classic Kafka service using the Aiven CLI.
avn service create SERVICE_NAME \
--service-type kafka \
--cloud CLOUD_REGION \
--plan PLAN_NAME
Parameters:
SERVICE_NAME: Name of the Kafka service.CLOUD_REGION: Cloud provider and region.PLAN_NAME: Classic Kafka plan.
Use Terraform to create a classic Kafka service in your Aiven project.
-
Create a file named
provider.tfand add the following:Loading... -
Create a file named
service.tfand add the following:Loading... -
Create a file named
variables.tfand add the following:Loading... -
Create the
terraform.tfvarsfile and add the values for your token and project name. -
Optional: To output connection details, create a file named
output.tfand add the following:Loading...
To apply your Terraform configuration:
-
Initialize Terraform by running:
terraform initThe output is similar to the following:
Initializing the backend...
Initializing provider plugins...
- Finding aiven/aiven versions matching ">= 4.0.0, < 5.0.0"...
- Installing aiven/aiven v4.9.2...
- Installed aiven/aiven v4.9.2
...
Terraform has been successfully initialized!
... -
To create an execution plan and preview the changes, run:
terraform plan -
To deploy your changes, run:
terraform apply --auto-approve
Create a Classic Kafka service on Bring your own cloud (BYOC)
You can run Classic Kafka in your own cloud account using BYOC.
- Console
- CLI
- In the Aiven Console, open your project and click Services.
- Click Create service.
- Select Apache Kafka®.
- Select Classic Kafka as the service type.
- Select Bring your own cloud (BYOC) as the deployment mode.
- In the Cloud section:
- Select your BYOC environment.
- Select a region.
- In the Plan section, choose a plan from the available plan groups.
- Optional:
- Adjust Additional disk storage.
- Enable Tiered storage if supported for your plan and region.
- In Service basics, enter:
- Name: Name of the service.
- Version: Select the Kafka version. The latest supported version appears by default.
- Tags: Optional. Add resource tags to organize your services.
- Review the Service summary, then click Create service.
Use the Aiven CLI to create a Classic Kafka BYOC service.
avn service create SERVICE_NAME \
--project PROJECT_NAME \
--service-type kafka \
--cloud CUSTOM_CLOUD_REGION \
--plan PLAN_NAME
Parameters:
CUSTOM_CLOUD_REGION: Your BYOC region.PLAN_NAME: Classic Kafka BYOC plan.
After service creation
Inkless services require a metadata coordinator and object storage. Aiven provisions these components automatically.
Aiven configures:
- Object storage access for storing diskless topic data. Inkless uses an Aiven-managed object storage bucket, which is created and managed for you.
- A PostgreSQL-based coordinator that stores metadata for diskless topics. The coordinator is provisioned automatically and linked to the Kafka service through a managed integration. It maintains metadata such as batch offsets and storage locations.
After creation, the Kafka Inkless PostgreSQL integration appears on the Integrations page in the Aiven Console. This integration is managed by Aiven and cannot be modified or removed.
Related pages