Initial Cluster Setup

Prerequisites: To get your DataPlatformCluster up and running, please make sure you are working within a provisioned Data Center and you have the appropriate permissions. The data center must be created upfront and must be accessible and editable by the user issuing the request. Only Contract Owners, Administrators, or 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.

Creating a new DataPlatformCluster

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

To create a cluster, use the Create 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. Currently, you can use only the "23.4" Version. The other supported versions can be obtained from the versions API endpoint https://api.ionos.com/dataplatform/versions.

Request

{
  "properties": {
    "name": "my-cluster",
    "dataPlatformVersion": "23.4",
    "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": "john.doe@example.com",
    "createdByUserId": "12345693-9ae1-40c5-9b49-7c0afeabcdef",
    "createdInContractNumber": "12315812",
    "lastModifiedDate": "2020-12-11T13:37:50Z",
    "lastModifiedBy": "jane.doe@example.com",
    "lastModifiedByUserId": "98765493-9ae1-40c5-9b49-7c0afefedcba",
    "state": "DEPLOYING"
  },
  "properties": {
    "name": "my-cluster",
    "dataPlatformVersion": "23.4",
    "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 provisioning of the cluster might take some time, that is until the cluster has the state AVAILABLE. To check the current provisioning status, you can query the API by calling the Get Endpoint with the cluster ID.

Adding 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 DataPlatformNodepool endpoint. This 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": "john.doe@example.com",
    "createdByUserId": "12345693-9ae1-40c5-9b49-7c0afeabcdef",
    "createdInContractNumber": "12315812",
    "lastModifiedDate": "2020-12-11T13:37:50Z",
    "lastModifiedBy": "jane.doe@example.com",
    "lastModifiedByUserId": "98765493-9ae1-40c5-9b49-7c0afefedcba",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "my-node-pool",
    "dataPlatformVersion": "23.4",
    "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"
    }
  }
}
Headers:
Name	

Downloading kubectl Credentials (kubeconfig)

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

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

If you still want to group your deployments, you have the option to create subnamespaces within the default namespace. This is made possible by the concept of Hierarchical Namespaces (HNS). For more information see Introducing Hierarchical Namespaces.

The kubeconfig can be downloaded with the Get Kubeconfig endpoint. This call retrieves the Kubernetes configuration file (kubeconfig) 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

Revision created

Minor update from the comments