import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
page = client.cloud.gpu_baremetal_clusters.list(
project_id=1,
region_id=7,
)
page = page.results[0]
print(page.id){
"count": 1,
"results": [
{
"created_at": "2023-11-07T05:31:56Z",
"flavor": "<string>",
"id": "<string>",
"managed_by": "k8s",
"name": "<string>",
"servers_count": 123,
"servers_ids": [
"<string>"
],
"servers_settings": {
"file_shares": [
{
"id": "<string>",
"mount_path": "<string>"
}
],
"interfaces": [
{
"ip_family": "dual",
"name": "eth0",
"type": "<string>"
}
],
"security_groups": [
{
"id": "<string>",
"name": "<string>"
}
],
"ssh_key_name": "my-ssh-key",
"user_data": "eyJ0ZXN0IjogImRhdGEifQ=="
},
"status": "active",
"tags": [
{
"key": "<string>",
"read_only": true,
"value": "<string>"
}
],
"updated_at": "2025-01-11T23:59:59Z"
}
]
}List all bare metal GPU clusters in the specified project and region.
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
page = client.cloud.gpu_baremetal_clusters.list(
project_id=1,
region_id=7,
)
page = page.results[0]
print(page.id){
"count": 1,
"results": [
{
"created_at": "2023-11-07T05:31:56Z",
"flavor": "<string>",
"id": "<string>",
"managed_by": "k8s",
"name": "<string>",
"servers_count": 123,
"servers_ids": [
"<string>"
],
"servers_settings": {
"file_shares": [
{
"id": "<string>",
"mount_path": "<string>"
}
],
"interfaces": [
{
"ip_family": "dual",
"name": "eth0",
"type": "<string>"
}
],
"security_groups": [
{
"id": "<string>",
"name": "<string>"
}
],
"ssh_key_name": "my-ssh-key",
"user_data": "eyJ0ZXN0IjogImRhdGEifQ=="
},
"status": "active",
"tags": [
{
"key": "<string>",
"read_only": true,
"value": "<string>"
}
],
"updated_at": "2025-01-11T23:59:59Z"
}
]
}API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234$abcdef
Limit of items on a single page
x <= 1000Specifies the entity responsible for managing the resource.
user: The resource (cluster) is created and maintained directly by the user.k8s: The resource is created and maintained automatically by Managed Kubernetes servicek8s, user Offset in results list
x >= 0OK
Number of objects
x >= 0Objects
Show child attributes
Cluster creation date time
Cluster flavor name
Cluster unique identifier
User type managing the resource
k8s, user Cluster name
Cluster servers count
List of cluster nodes
Show child attributes
List of file shares mounted across the cluster.
Show child attributes
Which subnets should be selected: IPv4, IPv6, or use dual stack.
dual, ipv4, ipv6 Interface name
"eth0"
"external"SSH key name
"my-ssh-key"
Optional custom user data
"eyJ0ZXN0IjogImRhdGEifQ=="
Cluster status
active, deleting, error, new, resizing List of key-value tags associated with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.
Cluster update date time
"2025-01-11T23:59:59Z"
Was this page helpful?