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: "2020-07-02T15:53:40.569692600Z"
  creatorClass: examplesvc.ves.io
  finalizers: []
  tenant: acmecorp
  uid: 5af68656-3aeb-4557-8340-dc5408dee4a3

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-build743694289_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: 620
Content-Type: application/json
Date: Thu, 02 Jul 2020 15:53:40 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "virtual-k8s-1",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "5af68656-3aeb-4557-8340-dc5408dee4a3",
    "creation_timestamp": "2020-07-02T15:53:40.569692600Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc.ves.io",
    "creator_id": "",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "vsite_refs": [
    ]
  }
}