ves-io-schema-virtual_k8s-API-Create

Examples of creating virtual_k8s

Usecase:

Create virtual-k8s-1

Request using vesctl:

vesctl configuration create virtual_k8s -i virtual_k8s.yaml

where file virtualk8s.yaml has following contents (virtualk8s.CreateRequest):

metadata:
  name: virtual-k8s-1
  namespace: documentation
spec: {}

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: virtual-k8s-1
  namespace: documentation
spec:
  vsiteRefs: []
systemMetadata:
  creationTimestamp: "2021-06-02T10:22:53.794024513Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: c7e16995-481f-4b1f-9664-2c752d886d34

Request using curl:

curl -X 'POST' -d '{"metadata":{"name":"virtual-k8s-1","namespace":"documentation"},"spec":{}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build186462253_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/virtual_k8ss'

curl response:

HTTP/1.1 200 OK
Content-Length: 655
Content-Type: application/json
Date: Wed, 02 Jun 2021 10:22:53 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "virtual-k8s-1",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "c7e16995-481f-4b1f-9664-2c752d886d34",
    "creation_timestamp": "2021-06-02T10:22:53.794024513Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "vsite_refs": [
    ],
    "default_flavor_ref": null
  }
}