ves-io-schema-k8s_cluster-API-List
On This Page:
Examples of listing k8s_cluster
Usecase:
List all k8s_clusters in current namespace
Request using vesctl:
vesctl configuration list k8s_cluster --namespace system
vesctl yaml response:
errors: []
items:
- annotations: {}
labels: {}
name: k8s-cluster-1
namespace: system
statusSet: []
tenant: acmecorp
uid: 4adb698e-7122-42ac-96c8-8431de2fda88
- annotations: {}
labels: {}
name: k8s-cluster-2
namespace: system
statusSet: []
tenant: acmecorp
uid: f44b210f-d0ea-4f05-8c2c-f76401804d2b
Request using curl:
curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_2__8qnt6fwd5dvglr1xqq6l8b7w0000gp_T_go-build3109416560_b001_apidocs.test/host=C02FN35BMD6R/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/k8s_clusters'
curl response
HTTP/1.1 200 OK
Content-Length: 834
Content-Type: application/json
Date: Thu, 21 Mar 2024 14:05:50 GMT
Vary: Accept-Encoding
{
"items": [
{
"tenant": "acmecorp",
"namespace": "system",
"name": "k8s-cluster-1",
"uid": "4adb698e-7122-42ac-96c8-8431de2fda88",
"description": "",
"disabled": false,
"labels": {
},
"annotations": {
},
"owner_view": null,
"metadata": null,
"system_metadata": null,
"get_spec": null,
"status_set": [
]
},
{
"tenant": "acmecorp",
"namespace": "system",
"name": "k8s-cluster-2",
"uid": "f44b210f-d0ea-4f05-8c2c-f76401804d2b",
"description": "",
"disabled": false,
"labels": {
},
"annotations": {
},
"owner_view": null,
"metadata": null,
"system_metadata": null,
"get_spec": null,
"status_set": [
]
}
],
"errors": [
]
}