-
GET /api/marketplace-resources/<resource_uuid>/kubeconfig/
- Get the kubeconfig for a Kubernetes cluster.This endpoint retrieves the kubeconfig file for the specified Kubernetes cluster. The kubeconfig file contains the necessary configuration information to connect to the cluster using tools like
kubectl
. You'll need theresource_uuid
of the Kubernetes cluster, which you can obtain from the "List Kubernetes Cluster Resources" endpoint (6.2.2).Request Example:
GET [https://api.wayscloud.services/api/marketplace-resources/kubernetes_cluster_resource_uuid/kubeconfig/](https://www.google.com/search?q=https://api.wayscloud.services/api/marketplace-resources/kubernetes_cluster_resource_uuid/kubeconfig/)
Authorization: Token <your_api_token>Response Example:
# The response will contain the kubeconfig file content in YAML format
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: CERTIFICATE_AUTHORITY_DATA
server: SERVER_URL
name: kubernetes_cluster_resource_uuid
contexts:
- context:
cluster: kubernetes_cluster_resource_uuid
user: user_name
name: kubernetes_cluster_resource_uuid
current-context: kubernetes_cluster_resource_uuid
kind: Config
preferences: {}
users:
- name: user_name
user:
token: TOKEN_VALUEStatus Codes:
- 200 OK: The kubeconfig file was successfully retrieved.
- 401 Unauthorized: The user making the request is not authorized.
-
404 Not Found: The specified Kubernetes cluster
resource_uuid
does not exist.