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: 07fde58a-39f6-49c0-95a7-4296834bd70c
- annotations: {}
  labels: {}
  name: k8s-cluster-2
  namespace: system
  statusSet: []
  tenant: acmecorp
  uid: 5b2d0cc9-514b-46ca-896e-c0b1013bc972

Request using curl:

curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build672621555_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, 12 May 2021 11:18:00 GMT
Vary: Accept-Encoding

{
  "items": [
    {
      "tenant": "acmecorp",
      "namespace": "system",
      "name": "k8s-cluster-1",
      "uid": "07fde58a-39f6-49c0-95a7-4296834bd70c",
      "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": "5b2d0cc9-514b-46ca-896e-c0b1013bc972",
      "description": "",
      "disabled": false,
      "labels": {
      },
      "annotations": {
      },
      "owner_view": null,
      "metadata": null,
      "system_metadata": null,
      "object": null,
      "get_spec": null,
      "status_set": [
      ]
    }
  ],
  "errors": [
  ]
}