Skip to content

Set Default Cluster

For each Kelvin Instance you can set one default cluster.

Note

The default cluster will be used when adding Assets to any Kelvin SmartApp™.

Documentation on Adding Assets in the Kelvin UI can be found in the Operations Tools here.

Field Description
cluster The name of the default Cluster for Kelvin SmartApps™ deployment. The ., _ and - characters are also allowed to separate words instead of a space but not at the beginning or end).
max_resources The maximum number of Assets that can be assigned to each Workload. When the max number is reached, a new workload will be automatically deployed for Kelvin SmartApps™ and the new Assets.

This can not be set in the Kelvin UI.

API cURL Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
curl -X "POST" \
"https://<url.kelvin.ai>/api/v4/instance/settings/app-manager-planner-rules/update" \
-H "Authorization: Bearer <Your Current Token>" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"payload": {
  "cluster": "aws-cluster",
  "max_resources": 1
  }
}'
API Client (Python) Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
from kelvin.api.client import Client

# Login
client = Client(url="https://<url.kelvin.ai>", username="<your_username>")
client.login(password="<your_password>")

# Set or Update the Default Cluster in an Instance
response = client.instance.update_instance_settings_app_manager_planner_rules(data={
  "payload": {
    "cluster": "aws-cluster",
    "max_resources": 16
  }
})

print(f'Updated planner rules with default cluster {response.payload.cluster} with a maximum resource limit of {response.payload.max_resources}')

You will receive an output like this;

API Client (Python) Example Response
1
Updated planner rules with default cluster aws-cluster with a maximum resource limit of 16