ves-io-schema-k8s_cluster-API-List

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:

items:
- annotations: {}
  labels: {}
  name: k8s-cluster-1
  namespace: system
  statusSet: []
  tenant: acmecorp
  uid: d715b699-c29a-4235-b7c0-0cacf5264f11
- annotations: {}
  labels: {}
  name: k8s-cluster-2
  namespace: system
  statusSet: []
  tenant: acmecorp
  uid: 4b4a91b8-9ece-42c3-bf61-3806b2f1269c

Request using curl:

curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build817539475_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/k8s_clusters'

curl response

HTTP/1.1 200 OK
Content-Length: 859
Content-Type: application/json
Date: Mon, 22 Feb 2021 15:44:03 GMT
Vary: Accept-Encoding

{
  "items": [
    {
      "tenant": "acmecorp",
      "namespace": "system",
      "name": "k8s-cluster-1",
      "uid": "d715b699-c29a-4235-b7c0-0cacf5264f11",
      "description": "",
      "disabled": false,
      "labels": {
      },
      "annotations": {
      },
      "owner_view": null,
      "metadata": null,
      "system_metadata": null,
      "object": null,
      "get_spec": null,
      "status_set": [
      ]
    },
    {
      "tenant": "acmecorp",
      "namespace": "system",
      "name": "k8s-cluster-2",
      "uid": "4b4a91b8-9ece-42c3-bf61-3806b2f1269c",
      "description": "",
      "disabled": false,
      "labels": {
      },
      "annotations": {
      },
      "owner_view": null,
      "metadata": null,
      "system_metadata": null,
      "object": null,
      "get_spec": null,
      "status_set": [
      ]
    }
  ]
}