GET
/
cloud
/
v2
/
k8s
/
clusters
/
{project_id}
/
{region_id}
/
{cluster_name}
/
config
Python
from gcore import Gcore

client = Gcore(
    api_key="My API Key",
)
k8s_cluster_kubeconfig = client.cloud.k8s.clusters.get_kubeconfig(
    cluster_name="cluster_name",
    project_id=0,
    region_id=0,
)
print(k8s_cluster_kubeconfig.config)
{
  "config": "<string>",
  "created_at": "2024-02-15T11:53:03Z",
  "expires_at": "2026-02-15T11:53:03Z"
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

project_id
integer
required

Project identifier

region_id
integer
required

Region identifier

cluster_name
string
required

Cluster name

Response

200
application/json

Cluster kubeconfig

The response is of type object.