GET
/api/v1/kubernetes/cluster-config-download/{service_id}/
curl --request GET \ --url 'https://api.e2enetworks.com/myaccount/api/v1/kubernetes/cluster-config-download/{service_id}/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \ --header 'Authorization: Bearer <API_TOKEN>'import requests
response = requests.get( "https://api.e2enetworks.com/myaccount/api/v1/kubernetes/cluster-config-download/{service_id}/", params={"project_id": "<PROJECT_ID>", "apikey": "<API_KEY>", "location": "<LOCATION>"}, headers={"Authorization": "Bearer <API_TOKEN>"},)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/kubernetes/cluster-config-download/{service_id}/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", apikey: "<API_KEY>", location: "<LOCATION>" });
const response = await fetch(url, { method: "GET", headers: { "Authorization": "Bearer <API_TOKEN>" },});console.log(await response.json());Returns the cluster’s kubeconfig file - the credentials and endpoint used by kubectl and other clients to connect to the cluster’s API server. Save the response as your ~/.kube/config (or merge it in). Use the cluster service_id.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”service_id
required
integer
The cluster service_id, as returned by List.
Example
12345Query Parameters
Section titled “Query Parameters”project_id
required
integer
Identifier of the project to scope the request to. Required integer project ID.
Example
<PROJECT_ID>apikey
required
string
API key used to authenticate the request.
Example
<API_KEY>location
required
string
Region of the cluster.
Example
<LOCATION>Responses
Section titled “Responses”Successful response
Media typeapplication/json
The cluster’s kubeconfig, returned as YAML text (fields vary by cluster).
object
code
integer
data
The kubeconfig file contents.
string
errors
object
message
string
Example
{ "code": 200, "data": "apiVersion: v1\nclusters:\n- cluster:\n server: https://203.0.113.10:6443\n name: my-k8s-cluster\ncontexts:\n- context:\n cluster: my-k8s-cluster\n user: admin-user\n name: my-k8s-cluster\ncurrent-context: my-k8s-cluster\nkind: Config\nusers:\n- name: admin-user\n user:\n token: <token>\n", "message": "Success"}