Skip to main content
Version: 1.15.0

Inventory

List GPU nodes available for allocation requests (GPRs) in the cluster. These nodes are managed and allocated by EGS.

info

Across our documentation, we refer to the workspace as the slice workspace. The two terms are used interchangeably.

List Inventory​

Use this API to list Inventory.

Method and URL​

GET /api/v1/inventory/list

Example Request​

GET /api/v1/inventory/list
curl --location 'http://x.x.x.x:8080/api/v1/inventory/list'

Example Response​

Response: Success

{
"statusCode": 200,
"status": "OK",
"message": "Success",
"data": {
"managedNodes": [
{
"gpuNodeName": "gke-dev-2-gke-cluste-dev-2-gke-cluste-33478855-klfn",
"gpuShape": "n1-highcpu-2",
"gpuModelName": "Tesla-T4",
"instanceType": "n1-highcpu-2",
"clusterName": "worker-1",
"memory": 15,
"gpuCount": 1,
"gpuTempThreshold": "",
"gpuPowerThreshold": "",
"cloudProvider": "gcp",
"region": "",
"nodeHealth": "Healthy",
"gpuNodeState": "NODE_RESERVED",
"cloud": "gcp",
"allocation": [
{
"gprName": "gpr-b45a1d34-bf9c",
"sliceName": "avesha",
"totalGPUsAllocated": 1,
"allocationTimeStamp": {
"seconds": "1735025703",
"nanos": 0
}
}
]
},
{
"gpuNodeName": "gke-dev-2-gke-cluste-dev-2-gke-cluste-33478855-kcxz",
"gpuShape": "n1-highcpu-2",
"gpuModelName": "Tesla-T4",
"instanceType": "n1-highcpu-2",
"clusterName": "worker-1",
"memory": 15,
"gpuCount": 1,
"gpuTempThreshold": "",
"gpuPowerThreshold": "",
"cloudProvider": "gcp",
"region": "",
"nodeHealth": "Healthy",
"gpuNodeState": "NODE_AVAILABLE",
"cloud": "gcp"
}
],
"unmanagedNodes": []
}
}

List Inventory by Workspace​

Use this API to list GPU nodes currently allocated to the slice.

note

Only one GPR is provisioned on a workspace at any given time. Other GPRs requested will be queued and allocated one at a time based on the priority.

Method and URL​

GET /api/v1/inventory?sliceName=workspace1

Example Request​

GET /api/v1/inventory?sliceName=workspace1
curl --location 'http://localhost:8080/api/v1/inventory?sliceName=evening'

Example Responses​

Response: Success

{
"statusCode": 200,
"status": "OK",
"message": "Success",
"data": {
"items": [
{
"instanceType": "n1-highcpu-2",
"gpuShape": "Tesla-T4",
"gpuSlicingProfile": [],
"memoryPerGpu": 15,
"gpuPerNode": 1,
"totalGpuNodes": 2,
"clusterName": "worker-1"
}
]
}
}

Response: Not Found

{
"statusCode": 404,
"status": "Error",
"message": "Not Found",
"data": null,
"error": {
"errorKey": "",
"message": "Not Found",
"data": "{\"error\":{\"Message\":\"Error occurred while fetching the inventory details\",\"Status\":404,\"DetailedError\":{\"Errormessage\":\"sliceconfigs.controller.kubeslice.io \\\"workspace2\\\" not found\",\"Reason\":\"NotFound\",\"Details\":\"\"},\"StatusCode\":404,\"ReferenceDocumentation\":\"NA\"}}"
}
}

View Inventory Summary​

Use this API to get a quick overview of GPU resources available across clusters managed by EGS.

Method and URL​

GET /api/v1/inventory/summary

Example Request​

GET /api/v1/inventory/summary
curl --location 'http://x.x.x.x:8080/api/v1/inventory/summary'

Example Responses​

{
"statusCode": 200,
"status": "OK",
"message": "Success",
"data": {
"items": [
{
"clusterName": "worker-1",
"cloudProvider": "ORACLE",
"region": "Custom",
"totalGpus": 4,
"allocatedGpus": 0,
"availableGpus": 4,
"totalGpuNodes": 2,
"partiallyAllocatedNodes": 0,
"idleGpus": 0
},
{
"clusterName": "worker-2",
"cloudProvider": "",
"region": "",
"totalGpus": 2,
"allocatedGpus": 0,
"availableGpus": 2,
"totalGpuNodes": 1,
"partiallyAllocatedNodes": 0,
"idleGpus": 0
},
{
"clusterName": "worker-3",
"cloudProvider": "",
"region": "",
"totalGpus": 2,
"allocatedGpus": 0,
"availableGpus": 2,
"totalGpuNodes": 1,
"partiallyAllocatedNodes": 0,
"idleGpus": 0
},
{
"clusterName": "worker-4",
"cloudProvider": "gcp",
"region": "us-east1",
"totalGpus": 2,
"allocatedGpus": 1,
"availableGpus": 1,
"totalGpuNodes": 1,
"partiallyAllocatedNodes": 1,
"idleGpus": 0
}
]
}
}