import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
k8s_cluster_list = client.cloud.k8s.clusters.list(
project_id=0,
region_id=0,
)
print(k8s_cluster_list.count){
"count": 1,
"results": [
{
"add_ons": {
"slurm": {
"enabled": true,
"file_share_id": "cbc94d0e-06c6-4d12-9e86-9782ba14fc8c",
"ssh_key_ids": [
"25735292-bd97-44b0-a1af-d7eab876261d",
"efc01f3a-35b9-4385-89f9-e38439093ee7"
],
"worker_count": 2
}
},
"created_at": "<string>",
"csi": {
"nfs": {
"vast_enabled": true
}
},
"id": "<string>",
"is_public": true,
"keypair": "<string>",
"logging": {
"destination_region_id": 1,
"enabled": true,
"retention_policy": {
"period": 45
},
"topic_name": "my-log-name"
},
"name": "<string>",
"pools": [
{
"auto_healing_enabled": true,
"boot_volume_size": 123,
"boot_volume_type": "<string>",
"created_at": "<string>",
"crio_config": {},
"flavor_id": "<string>",
"id": "<string>",
"is_public_ipv4": true,
"kubelet_config": {},
"labels": {},
"max_node_count": 123,
"min_node_count": 123,
"name": "<string>",
"node_count": 123,
"status": "<string>",
"taints": {},
"servergroup_id": "",
"servergroup_name": "",
"servergroup_policy": ""
}
],
"status": "Deleting",
"version": "<string>",
"authentication": {
"kubeconfig_created_at": "2024-02-15T11:53:03Z",
"kubeconfig_expires_at": "2026-02-15T11:53:03Z",
"oidc": {
"client_id": "kubernetes",
"groups_claim": "groups",
"groups_prefix": "oidc:",
"issuer_url": "https://accounts.provider.example",
"required_claims": {
"claim": "value"
},
"signing_algs": [
"RS256",
"RS512"
],
"username_claim": "sub",
"username_prefix": "oidc:"
}
},
"autoscaler_config": {
"scale-down-unneeded-time": "5m"
},
"cni": {
"cilium": {
"encryption": false,
"hubble_relay": false,
"hubble_ui": false,
"lb_acceleration": false,
"lb_mode": "snat",
"mask_size": 24,
"mask_size_v6": 120,
"routing_mode": "tunnel",
"tunnel": "geneve"
},
"provider": "calico"
},
"creator_task_id": "1772de21-f013-4b70-9f8f-a518985b3bc2",
"ddos_profile": {
"enabled": true,
"fields": [
{
"base_field": 10,
"field_value": [
45046,
45047
]
}
],
"profile_template": 29
},
"fixed_network": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"fixed_subnet": "90729bc3-dd37-4761-ae09-b32f2f0a365b",
"is_ipv6": false,
"pods_ip_pool": "172.16.0.0/18",
"pods_ipv6_pool": "2a03:90c0:88:393::/64",
"services_ip_pool": "172.24.0.0/18",
"services_ipv6_pool": "2a03:90c0:88:381::/108",
"task_id": null
}
]
}import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
k8s_cluster_list = client.cloud.k8s.clusters.list(
project_id=0,
region_id=0,
)
print(k8s_cluster_list.count){
"count": 1,
"results": [
{
"add_ons": {
"slurm": {
"enabled": true,
"file_share_id": "cbc94d0e-06c6-4d12-9e86-9782ba14fc8c",
"ssh_key_ids": [
"25735292-bd97-44b0-a1af-d7eab876261d",
"efc01f3a-35b9-4385-89f9-e38439093ee7"
],
"worker_count": 2
}
},
"created_at": "<string>",
"csi": {
"nfs": {
"vast_enabled": true
}
},
"id": "<string>",
"is_public": true,
"keypair": "<string>",
"logging": {
"destination_region_id": 1,
"enabled": true,
"retention_policy": {
"period": 45
},
"topic_name": "my-log-name"
},
"name": "<string>",
"pools": [
{
"auto_healing_enabled": true,
"boot_volume_size": 123,
"boot_volume_type": "<string>",
"created_at": "<string>",
"crio_config": {},
"flavor_id": "<string>",
"id": "<string>",
"is_public_ipv4": true,
"kubelet_config": {},
"labels": {},
"max_node_count": 123,
"min_node_count": 123,
"name": "<string>",
"node_count": 123,
"status": "<string>",
"taints": {},
"servergroup_id": "",
"servergroup_name": "",
"servergroup_policy": ""
}
],
"status": "Deleting",
"version": "<string>",
"authentication": {
"kubeconfig_created_at": "2024-02-15T11:53:03Z",
"kubeconfig_expires_at": "2026-02-15T11:53:03Z",
"oidc": {
"client_id": "kubernetes",
"groups_claim": "groups",
"groups_prefix": "oidc:",
"issuer_url": "https://accounts.provider.example",
"required_claims": {
"claim": "value"
},
"signing_algs": [
"RS256",
"RS512"
],
"username_claim": "sub",
"username_prefix": "oidc:"
}
},
"autoscaler_config": {
"scale-down-unneeded-time": "5m"
},
"cni": {
"cilium": {
"encryption": false,
"hubble_relay": false,
"hubble_ui": false,
"lb_acceleration": false,
"lb_mode": "snat",
"mask_size": 24,
"mask_size_v6": 120,
"routing_mode": "tunnel",
"tunnel": "geneve"
},
"provider": "calico"
},
"creator_task_id": "1772de21-f013-4b70-9f8f-a518985b3bc2",
"ddos_profile": {
"enabled": true,
"fields": [
{
"base_field": 10,
"field_value": [
45046,
45047
]
}
],
"profile_template": 29
},
"fixed_network": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"fixed_subnet": "90729bc3-dd37-4761-ae09-b32f2f0a365b",
"is_ipv6": false,
"pods_ip_pool": "172.16.0.0/18",
"pods_ipv6_pool": "2a03:90c0:88:393::/64",
"services_ip_pool": "172.24.0.0/18",
"services_ipv6_pool": "2a03:90c0:88:381::/108",
"task_id": null
}
]
}API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234$abcdef
Project identifier
Region identifier
List of k8s clusters
Number of objects
x >= 0Objects
Show child attributes
Cluster add-ons configuration
Show child attributes
Slurm add-on configuration
Show child attributes
Indicates whether Slurm add-on is deployed in the cluster.
This add-on is only supported in clusters running Kubernetes v1.31 and v1.32 with at least 1 GPU cluster pool.
ID of a VAST file share used as Slurm storage.
The Slurm add-on creates separate Persistent Volume Claims for different purposes (controller spool, worker spool, jail) on that file share.
"cbc94d0e-06c6-4d12-9e86-9782ba14fc8c"
IDs of SSH keys authorized for SSH connection to Slurm login nodes.
[
"25735292-bd97-44b0-a1af-d7eab876261d",
"efc01f3a-35b9-4385-89f9-e38439093ee7"
]Size of the worker pool, i.e. number of worker nodes.
Each Slurm worker node is backed by a Pod scheduled on one of cluster's GPU nodes.
2
Function creation date
Cluster pool uuid
Cluster is public
Keypair
Logging configuration
Show child attributes
ID of the region in which the logs will be stored
1
Indicates if log streaming is enabled or disabled
The topic name to stream logs to
"my-log-name"
{
"destination_region_id": 1,
"enabled": true,
"retention_policy": { "period": 45 },
"topic_name": "my-log-name"
}Name
pools
Show child attributes
Indicates the status of auto healing
Size of the boot volume
Type of the boot volume
Date of function creation
ID of the cluster pool flavor
UUID of the cluster pool
Indicates if the pool is public
Maximum node count in the cluster pool
Minimum node count in the cluster pool
Name of the cluster pool
Node count in the cluster pool
Status of the cluster pool
Server group ID
Server group name
Anti-affinity, affinity or soft-anti-affinity server group policy
Status
Deleting, Provisioned, Provisioning K8s version
Cluster authentication settings
Show child attributes
Kubeconfig creation date
"2024-02-15T11:53:03Z"
Kubeconfig expiration date
"2026-02-15T11:53:03Z"
OIDC authentication settings
Show child attributes
Client ID
"kubernetes"
JWT claim to use as the user's group
"groups"
Prefix prepended to group claims
"oidc:"
Issuer URL
"https://accounts.provider.example"
Accepted signing algorithms
ES256, ES384, ES512, PS256, PS384, PS512, RS256, RS384, RS512 ["RS512"]JWT claim to use as the user name
"sub"
Prefix prepended to username claims to prevent clashes
"oidc:"
{
"kubeconfig_created_at": "2024-02-15T11:53:03Z",
"kubeconfig_expires_at": "2026-02-15T11:53:03Z",
"oidc": {
"client_id": "kubernetes",
"groups_claim": "groups",
"groups_prefix": "oidc:",
"issuer_url": "https://accounts.provider.example",
"required_claims": { "claim": "value" },
"signing_algs": ["RS256", "RS512"],
"username_claim": "sub",
"username_prefix": "oidc:"
}
}Cluster CNI settings
Show child attributes
Cilium settings
Show child attributes
Wireguard encryption
Hubble Relay
Hubble UI
LoadBalancer acceleration
LoadBalancer mode
dsr, hybrid, snat Mask size for IPv4
Mask size for IPv6
Routing mode
native, tunnel CNI provider
, geneve, vxlan CNI provider
calico, cilium Task that created this entity
"1772de21-f013-4b70-9f8f-a518985b3bc2"
Advanced DDoS Protection profile
Show child attributes
Enable advanced DDoS protection
DDoS profile parameters
Show child attributes
Complex value. Only one of 'value' or 'field_value' must be specified
[45046, 45047]Basic value. Only one of 'value' or 'field_value' must be specified
500null
[
{
"base_field": 10,
"field_value": [45046, 45047]
}
]DDoS profile template ID
29
DDoS profile template name
{
"enabled": true,
"fields": [
{
"base_field": 10,
"field_value": [45046, 45047]
}
],
"profile_template": 29
}Fixed network id
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Fixed subnet id
"90729bc3-dd37-4761-ae09-b32f2f0a365b"
Enable public v6 address
The IP pool for the pods
"172.16.0.0/18"
The IPv6 pool for the pods
"2a03:90c0:88:393::/64"
The IP pool for the services
"172.24.0.0/18"
The IPv6 pool for the services
"2a03:90c0:88:381::/108"
The UUID of the active task that currently holds a lock on the resource. This lock prevents concurrent modifications to ensure consistency. If null, the resource is not locked.
null
Was this page helpful?