Initial Cluster Setup

Prerequisites: To get your DataPlatformCluster up and running,

  • Ensure you work within a provisioned Data Center and have the appropriate permissions.

  • The data center must be created upfront, accessible, and editable by the requesting user.

  • Make sure you have the necessary permissions. Only contract administrators, owners, and users with the Manage Dataplatform permission can create a cluster.

Note: To interact with this API, a user-specific authentication token is required. The IONOS CLI can generate this token.

Create a new DataPlatformCluster

Before using the managed Stackable solution, you need to create a new DataPlatformCluster.

To create a cluster, use the Create a DataPlatformCluster API endpoint. The cluster will be provisioned in the data center, matching the provided datacenterId.

The request for cluster creation expects a string value for the dataPlatformVersion. Example: 25.3. The other supported versions can be obtained using the Versions API endpoint https://api.ionos.com/dataplatform/versions.

Request

{
  "properties": {
    "name": "my-cluster",
    "dataPlatformVersion": "25.3",
    "datacenterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "maintenanceWindow": {
      "time": "16:30:59",
      "dayOfTheWeek": "Monday"
    }
  }
}

Response

You should see a response similar to this one:

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "type": "cluster",
  "href": "https://api.ionos.com/dataplatform/v1/clusters/498ae72f-411f-11eb-9d07-046c59cc737e",
  "metadata": {
    "ETag": "123aaa5d587dcd0d58f767d464abcdef",
    "createdDate": "2020-12-10T13:37:50Z",
    "createdBy": "[email protected]",
    "createdByUserId": "12345693-9ae1-40c5-9b49-7c0afeabcdef",
    "createdInContractNumber": "12315812",
    "lastModifiedDate": "2020-12-11T13:37:50Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "98765493-9ae1-40c5-9b49-7c0afefedcba",
    "state": "DEPLOYING"
  },
  "properties": {
    "name": "my-cluster",
    "dataPlatformVersion": "25.3",
    "datacenterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "maintenanceWindow": {
      "time": "16:30:59",
      "dayOfTheWeek": "Monday"
    }
  }
}

In the response, the id field represents the cluster ID of the Managed Stackable cluster that is being created. We will refer to the value of this field, in this case 3fa85f64-5717-4562-b3fc-2c963f66afa6, when we will use the term cluster ID.

The cluster's provisioning might take some time, and after the process is complete, its state changes to AVAILABLE. To check the current provisioning status, you can query the API by calling the Retrieve a DataPlatformCluster GET endpoint with the cluster ID.

Add a DataPlatformNodePool

To deploy and run a Stackable service, the cluster must have enough computational resources. The node pool that is provisioned along with the cluster is reserved for Stackable operators. You may create further node pools with resources tailored to your use case.

To create a new node pool, use the Create a DataPlatformNodePool endpoint. It creates a new node pool and assigns the node pool resources exclusively to the defined managed cluster.

Request

{
  "properties": {
    "name": "my-node-pool",
    "nodeCount": 2,
    "cpuFamily": "AUTO",
    "coresCount": 4,
    "ramSize": 4096,
    "availabilityZone": "AUTO",
    "storageType": "SSD",
    "storageSize": 20,
    "maintenanceWindow": {
      "time": "16:30:59",
      "dayOfTheWeek": "Monday"
    },
    "labels": {
      "foo": "bar"
    },
    "annotations": {
      "foo": "bar"
    }
  }
}

Response

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "type": "nodepool",
  "href": "https://api.ionos.com/dataplatform/v1/clusters/498ae72f-411f-11eb-9d07-046c59cc737e/nodepools/abcd7e2f-9876-1234-abcd-123459498ae7",
  "metadata": {
    "ETag": "123aaa5d587dcd0d58f767d464abcdef",
    "createdDate": "2020-12-10T13:37:50Z",
    "createdBy": "[email protected]",
    "createdByUserId": "12345693-9ae1-40c5-9b49-7c0afeabcdef",
    "createdInContractNumber": "12315812",
    "lastModifiedDate": "2020-12-11T13:37:50Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "98765493-9ae1-40c5-9b49-7c0afefedcba",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "my-node-pool",
    "dataPlatformVersion": "25.3",
    "datacenterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "nodeCount": 2,
    "cpuFamily": "AUTO",
    "coresCount": 4,
    "ramSize": 4096,
    "availabilityZone": "AUTO",
    "storageType": "SSD",
    "storageSize": 20,
    "maintenanceWindow": {
      "time": "16:30:59",
      "dayOfTheWeek": "Monday"
    },
    "labels": {
      "foo": "bar"
    },
    "annotations": {
      "foo": "bar"
    }
  }
}

Download kubectl credentials (kubeconfig)

Once the DataPlatformCluster has been created, its Kubernetes configuration file (kubeconfig) can be accessed by the API. The kubeconfig allows interaction with the provided cluster and any regular Kubernetes cluster.

To protect the deployment of the Stackable distribution, the kubeconfig does not provide you with administrator rights for the cluster. This means that your actions and deployments are limited to the default namespace.

If you still want to group your deployments, you can create subnamespaces within the default namespace using Hierarchical Namespaces (HNS). For more information, see Introducing Hierarchical Namespaces.

The kubeconfig can be downloaded with the Read the Kubeconfig GET endpoint. This call retrieves the kubeconfig file for the specified DataPlatformCluster by its cluster ID.

To make the call, you need to use the cluster ID of the created DataPlatformCluster.

Last updated

Was this helpful?