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:

errors: []
items:
- annotations: {}
  labels: {}
  name: k8s-cluster-1
  namespace: system
  statusSet: []
  tenant: acmecorp
  uid: 241e001c-ca08-49e1-925e-9419ed33588b
- annotations: {}
  labels: {}
  name: k8s-cluster-2
  namespace: system
  statusSet: []
  tenant: acmecorp
  uid: 8f99e76c-f392-4bdb-ae6e-28ce4770b842

Request using curl:

curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build381173587_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: 878
Content-Type: application/json
Date: Wed, 14 Jul 2021 08:07:16 GMT
Vary: Accept-Encoding

{
  "items": [
    {
      "tenant": "acmecorp",
      "namespace": "system",
      "name": "k8s-cluster-1",
      "uid": "241e001c-ca08-49e1-925e-9419ed33588b",
      "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": "8f99e76c-f392-4bdb-ae6e-28ce4770b842",
      "description": "",
      "disabled": false,
      "labels": {
      },
      "annotations": {
      },
      "owner_view": null,
      "metadata": null,
      "system_metadata": null,
      "object": null,
      "get_spec": null,
      "status_set": [
      ]
    }
  ],
  "errors": [
  ]
}