Create a Kafka Cluster

You can create a new Kafka cluster with specified configurations.

Note:

  • Only contract administrators, owners, and users with Access and manage Event Streams for Apache Kafka privileges can create and manage Kafka clusters.

  • After creating the cluster, you can use it via the corresponding LAN and certificates.

The data center must be provided as an UUID. The easiest way to retrieve the UUID is through the Cloud API.

Endpoint

POST /clusters

The POST /clusters endpoint allows you to create a new Kafka cluster with specified properties. The name, version, size, and connection fields are required. The response includes the newly created cluster's ID, metadata, and properties, along with its current state and broker addresses.

Use this endpoint to provision a Kafka cluster tailored to your application's requirements, ensuring seamless integration and efficient data management.

Request

curl -X 'POST' \
  'https://kafka.de-txl.ionos.com/clusters' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer $Token' \
--data
'{
  "metadata": {},
  "properties": {
    "name": "my-kafka-cluster",
    "version": "3.7.0",
    "size": "S",
    "connections": [
      {
        "datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
        "lanId": "2",
        "brokerAddresses": [
          "192.168.1.101/24",
          "192.168.1.102/24",
          "192.168.1.103/24"
        ]
      }
    ]
  }
}`

To make authenticated requests to the API, the following fields are mandatory in the request header:

Header Parameters
Required
Type
Description

Content-Type

yes

string

Set this to application/json.

Accept

yes

string

Set this to application/json.

Authorization

yes

string

Provide a header value as Bearer followed by your token.

Response

200 Successful operation

{
  "id": "e69b22a5-8fee-56b1-b6fb-4a07e4205ead",
  "type": "cluster",
  "href": "/clusters/e69b22a5-8fee-56b1-b6fb-4a07e4205ead",
  "metadata": {
    "createdDate": "2020-12-10T13:37:50+01:00",
    "createdBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "lastModifiedDate": "2020-12-11T13:37:50+01:00",
    "lastModifiedBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "resourceURN": "ionos:<product>:<location>:<contract>:<resource-path>",
    "state": "AVAILABLE",
    "brokerAddresses": [
      "192.168.1.101:9093",
      "192.168.1.102:9093",
      "192.168.1.103:9093"
    ]
  },
  "properties": {
    "name": "my-kafka-cluster",
    "version": "3.7.0",
    "size": "S",
    "connections": [
      {
        "datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
        "lanId": "2",
        "brokerAddresses": [
          "192.168.1.101/24",
          "192.168.1.102/24",
          "192.168.1.103/24"
        ]
      }
    ]
  }
}

Last updated