Initial Cluster Setup
Note: To interact with this API, a user-specific authentication token is required. The IONOS CLI can be used to 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
. The available versions can be obtained from the versions API endpoint.
Request
{
"properties": {
"name": "my-cluster",
"dataPlatformVersion": "22.11",
"datacenterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"maintenanceWindow": {
"time": "16:30:59",
"dayOfTheWeek": "Monday"
}
}
}
The provisioning of the cluster might take some time. To check the current provisioning status, you can query the cluster by calling the Get Endpoint with the cluster ID that was provided to you in the response of the create cluster call.
Response
Once the cluster has been created, 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": "AVAILABLE"
},
"properties": {
"name": "my-cluster",
"dataPlatformVersion": "22.11",
"datacenterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"maintenanceWindow": {
"time": "16:30:59",
"dayOfTheWeek": "Monday"
}
}
}
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.
The cluster ID can be found in the response when a cluster is created or when you GET a list of all DataPlatformClusters.
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": "22.11",
"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 the interaction with the provided cluster as with any regular Kubernetes cluster.
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. The ID can be found in the response when a cluster is created or when you GET a list of all DataPlatformClusters.
Last updated
Was this helpful?