Skip to content

Tenant

The management of your Tenants is also possible via API in a fully automatable way.

Create a Tenant

To create a new Tenant, the following request must be used:

HTTP Request:

POST /k8sgpu/v1/cluster/

HTTP Response

{
  "message": "Cluster in creation",
  "cluster": "skg100004"
}

View all Tenants

To view all active Tenants, simply use the following request:

HTTP Request

GET /k8sgpu/v1/cluster/

[
  {
    "name": "skg00018",
    "label": "tenant-lab",
    "customer": "skgu00004",
    "active": true,
    "created": true,
    "created_at": "2024-08-12T14:46:49.127000+00:00"
  },
  {
    "name": "skg100004",
    "label": "tenant-prod",
    "customer": "skgu00004",
    "active": true,
    "created": true,
    "created_at": "2024-08-13T12:50:17.683000+00:00"
  }
]

View a Specific Tenant

It is also possible to view a specific Tenant:

HTTP Request

GET /k8sgpu/v1/cluster/{cluster_name}

HTTP Response

{
  "name": "skg100004",
  "label": "tenant-prod",
  "customer": "skgu00004",
  "active": true,
  "created": true,
  "created_at": "2024-08-13T12:50:17.683000+00:00"
}

Rename a Tenant

Each tenant has a label to make it easier for users to identify it. This label can also be modified via API with the following request:

HTTP Request

PUT/PATCH /k8sgpu/v1/cluster/{cluster_name}
{
  "label": "la-mia-nuova-label"
}

HTTP Response

{
  "name": "skg100004",
  "label": "my-new-label",
  "customer": "skgu00004",
  "active": true,
  "created": true,
  "created_at": "2024-08-13T12:50:17.683000+00:00"
}

Obtain a KubeConfig for the Specific Tenant

After generating a Tenant to access ServerlessGPU services, it is necessary to generate a KubeConfig and Install it on your cluster.

It is also possible to generate the kubeconfig via API with the following request:

HTTP Request

GET /k8sgpu/v1/cluster/{cluster_name}/kubeconfig

Remove a Tenant

It is also possible to remove the Tenant, this operation will terminate all PODs present on it. To do this, the following request is available:

HTTP Request

DELETE /k8sgpu/v1/cluster/{cluster_name}

HTTP Response

{
  "message": "Cluster in deletion",
  "cluster": "skg100026"
}