GET
/tenant_clusters/{tenant_cluster_id}/kubeconfig/
curl --request GET \ --url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/tenant_clusters/{tenant_cluster_id}/kubeconfig/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>'import requests
response = requests.get( "https://api.e2enetworks.com/myaccount/api/v1/gpu/tenant_clusters/{tenant_cluster_id}/kubeconfig/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"},)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/gpu/tenant_clusters/{tenant_cluster_id}/kubeconfig/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "GET", headers: { "Authorization": "Bearer <API_TOKEN>" },});console.log(await response.json());Returns the cluster’s kubeconfig as YAML text in data.kubeconfig. It is available while the cluster is worker_joined or ready; in any other status the call returns 412.
The kubeconfig gives full administrative access to the cluster and cannot be rotated or revoked; keep it as you would a private key.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”tenant_cluster_id
required
integer
Kubernetes cluster ID, as returned by List Kubernetes Clusters.
Query Parameters
Section titled “Query Parameters”project_id
required
integer
Project ID
active_iam
integer
Active IAM ID (To access contact person account) Find your Active IAM ID here
location
required
string
Location
Responses
Section titled “Responses”The cluster’s kubeconfig.
Media typeapplication/json
object
code
integer
data
object
tenant_cluster_id
integer
kubeconfig
The kubeconfig file’s contents.
string
errors
object
message
string
Example
{ "code": 200, "data": { "tenant_cluster_id": 103, "kubeconfig": "<KUBECONFIG_YAML>" }, "errors": {}, "message": "Tenant cluster kubeconfig fetched successfully"}