Enable Clusters
Enable vSphere Namespaces on the cluster. This operation sets up Kubernetes instance for the cluster along with worker nodes.
Request
URLURL
Path Parameters
Path Parameters
Identifier for the cluster on which vSphere Namespaces will be enabled. The parameter must be an identifier for the resource type: ClusterComputeResource.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
Specification for setting up the Kubernetes API server and the worker nodes.
{
"ephemeral_storage_policy": "string",
"image_storage": {
"storage_policy": "string"
},
"master_management_network": {
"mode": "DHCP",
"network": "string"
},
"master_storage_policy": "string",
"network_provider": "NSXT_CONTAINER_PLUGIN",
"service_cidr": {
"address": "string",
"prefix": 0
},
"size_hint": "enum"
}
Specification for storage to be used for container images.
This affects the size and resources allocated to the Kubernetes API server. It also affects the suggested default serviceCidr and podCidrs.
Possible values are: TINY , SMALL , MEDIUM , LARGE
CIDR block from which Kubernetes allocates service cluster IP addresses. This range should not overlap with those in Clusters.NCPClusterNetworkEnableSpec.pod-cidrs, Clusters.NCPClusterNetworkEnableSpec.ingress-cidrs, Clusters.NCPClusterNetworkEnableSpec.egress-cidrs, or other services running in the datacenter.
Identifies the network plugin that cluster networking functionalities for this vSphere Namespaces Cluster.
NSXT_CONTAINER_PLUGIN : NSX-T Container Plugin.
VSPHERE_NETWORK : vSphere Networking.
Possible values are: NSXT_CONTAINER_PLUGIN , VSPHERE_NETWORK
Identifier of storage policy associated with Kubernetes API server. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: SpsStorageProfile. When operations return a value of this structure as a result, the field will be an identifier for the resource type: SpsStorageProfile.
Specification for the management network on Kubernetes API server. Clusters.NetworkSpec.mode must be STATICRANGE as we require Kubernetes API server to have a stable address.
Identifier of storage policy associated with ephemeral disks of all the Kubernetes Pods in the cluster. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: SpsStorageProfile. When operations return a value of this structure as a result, the field will be an identifier for the resource type: SpsStorageProfile.
List of additional DNS names to associate with the Kubernetes API server. These DNS names are embedded in the TLS certificate presented by the API server. If unset, no additional DNS names are embedded in the TLS certificate.
The load balancer configuration is derived from the user-provisioned load balancer that will be used to operate a load balancer that fronts vSphere Namespaces cluster servers, Tanzu Kubernetes Grid API servers, and other servers upon request. This configuration is required for network providers that do not have a default load balancer included. This field is optional and it is only relevant when the value of Clusters.EnableSpec.network-provider is VSPHERE_NETWORK.
Disclaimer to be displayed prior to login via the Kubectl plugin. If unset, just skip it.
List of DNS server IP addresses to use on Kubernetes API server, specified in order of preference. If unset, no default DNS servers are set.
List of domains (for example “vmware.com”) to be searched when trying to lookup a host name on Kubernetes API server, specified in order of preference. If unset, no default DNS search domains are set.
List of NTP server DNS names or IP addresses to use on Kubernetes API server, specified in order of preference. If unset, VMware Tools based time synchronization is enabled.
Identifier of the Content Library which holds the VM Images for vSphere Kubernetes Service. This Content Library should be subscribed to VMware’s hosted vSphere Kubernetes Service Repository. If unset, the Content Library will be automatically generated and configured to the cluster. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.content.Library. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.content.Library.
Default image repository to use when Kubernetes Pod container specification does not specify it as part of the container image name. If unset, defaults to Docker Hub official repository in case of Docker Hub image registry, otherwise defaults to empty string.
Specification for the NSX Container Plugin cluster network. This field is optional and it is only relevant when the value of Clusters.EnableSpec.network-provider is NSXT_CONTAINER_PLUGIN.
Default image registry to use when Kubernetes Pod container specification does not specify it as part of the container image name. If unset, defaults to Docker Hub.
Specification for configuring Cloud Native Storage file volume support on Supervisor. This feature provides support for provisioning ReadWriteMany persistent volumes on this cluster and/or external clusters. If unset, file volume support will not be enabled on this Supervisor.
Proxy configuration that will be applied to the Supervisor. The proxy should be reachable from the management network and will be used for image pulling and container traffic exiting out of the Supervisor. If unset the settings will be inherited from the vCenter settings if available.
List of DNS server IP addresses to use on the worker nodes, specified in order of preference. If unset, no default DNS servers are set.
Specification for the workload networks to be associated with the cluster. This field is optional and it is only relevant when the value of Clusters.EnableSpec.network-provider is VSPHERE_NETWORK.
List of NTP server DNS names or IP addresses to use for workloads such as Tanzu Kubernetes Grid VMs, specified in order of preference. If unset, NTP server for Kubernetes API servers will be used.
Authentication
Errors
Errors
com.vmware.vapi.std.errors.already_exists : if the cluster already has vSphere Namespaces enabled. | com.vmware.vapi.std.errors.invalid_argument : if spec contain any errors. | com.vmware.vapi.std.errors.unsupported : if the specified cluster is not supported for vSphere Namespaces, the cluster’s hosts do not have the required ESX version, or for any other incompatibilities.
com.vmware.vapi.std.errors.unauthorized : if the user does not have Namespaces.Manage privilege.
com.vmware.vapi.std.errors.error : if the system reports an error while responding to the request. | com.vmware.vapi.std.errors.unable_to_allocate_resource : if the specified cluster is not licensed or resource pool reservation for control plane VMs fails.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
PowerCLI Client SDK All Parameters Example
cURL Command
Vendor Extensions
x-vmw-doc-operation: enable