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_certificate = client.cloud.k8s.clusters.get_certificate(
cluster_name="my-cluster",
project_id=1,
region_id=7,
)
print(k8s_cluster_certificate.certificate)
Copy
Ask AI
{
"certificate": "<string>",
"key": "<string>"
}
Managed Kubernetes
Get k8s cluster CA certificate
GET
/
cloud
/
v2
/
k8s
/
clusters
/
{project_id}
/
{region_id}
/
{cluster_name}
/
certificates
Python
Copy
Ask AI
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_certificate = client.cloud.k8s.clusters.get_certificate(
cluster_name="my-cluster",
project_id=1,
region_id=7,
)
print(k8s_cluster_certificate.certificate)