[{"label":"Latest (v37.2)","version":"latest"},{"version":"v37.1"},{"version":"v37.0"},{"version":"v36.3"},{"version":"v36.2"},{"version":"v36.1"},{"version":"v36.0"},{"link":"https://developer.vmware.com/apis/1046/vmware-cloud-director","version":"v35.0"}]
vmware-cloud-director

Create k8s Cluster

Description

Creates a new Kubernetes cluster. This operation is asynchronous and returns a task that you can monitor to track the progress of the request.

Request

Request

URL

URL


post
https://{api_host}/cloudapi/1.0.0/tkgClusters
Copy

Request Body

Request Body

Cluster of type(s) application/json Required

Example Value for CSE Native cluster

{
  "metadata": {
    "name": "my-CSE-Native-cluster",
    "site": "",
    "orgName": "my-organization",
    "virtualDataCenterName": "my-org-vdc"
  },
  "apiVersion": "cse.vmware.com/v2.0",
  "kind": "native",
  "spec": {
    "expose": false,
    "settings": {
      "sshKey": null,
      "network": null,
      "ovdcNetwork": "network-in-my-org-vdc",
      "rollbackOnFailure": true
    },
    "topology": {
      "workers": {
        "count": 1
      },
      "controlPlane": {
        "count": 1
      }
    },
    "distribution": {
      "templateName": "ubuntu-16.04_k8-1.18_weave-2.6.5",
      "templateRevision": 2
    }
  }
}

Example Value for TKGS cluster

{
  "kind": "TanzuKubernetesCluster",
  "metadata": {
    "name": "my-TKGS-cluster",
    "placementPolicy": "my-placement-policy",
    "virtualDataCenterName": "my-org-vdc"
  },
  "spec": {
    "distribution": {
      "version": "v1.20.2"
    },
    "topology": {
      "controlPlane": {
        "class": "best-effort-xsmall",
        "count": 1,
        "storageClass": "my-storage-class"
      },
      "workers": {
        "class": "best-effort-xsmall",
        "count": 1,
        "storageClass": "my-storage-class"
      }
    }
  }
}

{
	"apiVersion": "string",
	"kind": "string",
	"metadata": {},
	"spec": {},
	"status": {}
}
string
apiVersion Optional

string
kind Optional

map of object
metadata Optional

map of object
spec Optional

map of object
status Optional
Authentication

Authentication

This operation uses the following authentication methods.

Response

Response

202 Accepted

The request have been accepted and the task to monitor the request is in the Location header.

Errors

Errors

Error
400

Invalid configuration.

Code Samples

Code Samples

cURL Command

curl -X POST -H "Content-Type: application/json" -d '{"apiVersion":"string","kind":"string","metadata":{},"spec":{},"status":{}}' https://{api_host}/cloudapi/1.0.0/tkgClusters


[{"label":"Latest (v37.2)","version":"latest"},{"version":"v37.1"},{"version":"v37.0"},{"version":"v36.3"},{"version":"v36.2"},{"version":"v36.1"},{"version":"v36.0"},{"link":"https://developer.vmware.com/apis/1046/vmware-cloud-director","version":"v35.0"}]
vmware-cloud-director
Feedback

Was this page helpful?