Enable-WMCluster

Enables the workload management feature on the specified cluster. It also requires a connection to vCenter Server using the Connect-VIServer cmdlet.

Syntax

-Cluster  <Cluster>
-EphemeralStoragePolicy  <SpbmStoragePolicy>
-ExternalEgressCIDRs  <String[]>
-ExternalIngressCIDRs  <String[]>
-ImageStoragePolicy  <SpbmStoragePolicy>
-ManagementNetworkMode  <WMNetworkMode>
-ManagementVirtualNetwork  <Network>
-MasterStoragePolicy  <SpbmStoragePolicy>
-PodCIDRs  <String[]>
-ServiceCIDR  <String>
-SizeHint  <WMNamespaceManagementSizingHint>
[-ConfigurationTimeoutSeconds  <Int32>]
[-ContentLibrary  <ContentLibrary>]
[-DefaultImageRegistryHostPort  <Int32>]
[-DefaultImageRegistryHostname  <String>]
[-DefaultImageRepository  <String>]
[-DistributedSwitch  <VDSwitch>]
[-LoginBanner  <String>]
[-ManagementNetworkAddressRangeSize  <Int32>]
[-ManagementNetworkFloatingIPAddress  <String>]
[-ManagementNetworkGateway  <String>]
[-ManagementNetworkStartIPAddress  <String>]
[-ManagementNetworkSubnetMask  <String>]
[-MasterDnsNames  <String[]>]
[-MasterDnsSearchDomain  <String[]>]
[-MasterDnsServerIPAddress  <String[]>]
[-MasterNtpServer  <String[]>]
[-NsxEdgeClusterId  <String>]
[-OpaqueSwitchName  <String>]
[-RunAsync]
[-Server  <VIServer[]>]
[-WorkerDnsServer  <String[]>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Cluster
Cluster named
  • pipeline
  • Specifies the cluster where you want to enable the workload management feature.
    required
    EphemeralStoragePolicy
    SpbmStoragePolicy named Specifies the storage policy associated with ephemeral disks of all the Kubernetes Pods in the cluster.
    required
    ExternalEgressCIDRs
    String[] named Specifies the Classless Inter-Domain Routing (CIDR) blocks from which NSX assigns IP addresses used for performing Source Network Address Translation (SNAT) from container IPs to external IPs. These ranges should not overlap with those in PodCIDRs, ServiceCIDR, ExternalIngressCIDRs, or other services that run in the data center. The value is formatted as IPv4NetworkAddress/PrefixInteger. For example, you can use this to represent 256 IP addresses using the value of "10.10.10.0/24".
    required
    ExternalIngressCIDRs
    String[] named Specifies CIDR blocks from which NSX assigns IP addresses for Kubernetes Ingresses and Kubernetes Services of type LoadBalancer. These ranges should not overlap with those in PodCIDRs, ServiceCIDR, ExternalEgressCIDRs, or other services that run in the data center.
    required
    ImageStoragePolicy
    SpbmStoragePolicy named Specifies the storage policy associated with the storage that you want to use for container images.
    required
    ManagementNetworkMode
    WMNetworkMode named Specifies the type of network configuration used for the network adapters attached to the management network.
    required
    ManagementVirtualNetwork
    Network named Specifies the port group or opaque network to which the management network interface of the Kubernetes API server is attached.
    required
    MasterStoragePolicy
    SpbmStoragePolicy named Specifies the storage policy associated with the Kubernetes API server.
    required
    PodCIDRs
    String[] named Specifies CIDR blocks from which Kubernetes allocates Pod IP addresses. This range should not overlap with those in ServiceCIDRs, ExternalIngressCIDRs, ExternalEgressCIDRs, or other services that run in the data center. All Pod CIDR blocks must be of at least subnet size /23.
    required
    ServiceCIDR
    String named Specifies a CIDR block from which Kubernetes allocates service cluster IP addresses. This range should not overlap with those in PodCIDRs, ExternalIngressCIDRs, ExternalEgressCIDRs, or other services that run in the data center. The value is formatted as IPv4NetworkAddress/PrefixInteger. For example, you can use this to represent 256 IP addresses using the value of "10.10.10.0/24".
    required
    SizeHint
    WMNamespaceManagementSizingHint named Specifies the expected size and resources allocated to the Kubernetes API server and the worker nodes.
    optional
    ConfigurationTimeoutSeconds
    Int32 named Specifies a timeout in seconds to wait for the operation to complete. The default timeout is 1 hour.
    optional
    ContentLibrary
    ContentLibrary named Specifies the content library which holds the virtual machine images for the workload management feature.
    optional
    DefaultImageRegistryHostPort
    Int32 named Specifies the port of the container image registry that is used by the cluster. If not specified, the default one is 443.
    optional
    DefaultImageRegistryHostname
    String named Specifies the IP address or the host name of the container image registry that is used by the cluster.
    optional
    DefaultImageRepository
    String named Specifies the name of the default image repository in the specified registry that is used by the cluster.
    optional
    DistributedSwitch
    VDSwitch named Specifies the vSphere distributed switch used to connect this cluster to the overlay transport zone. In order to run this command, you must configure the switch in NSX-T in advance.
    optional
    LoginBanner
    String named Specifies the disclaimer that you want to be displayed before logging in through the Kubectl plugin.
    optional
    ManagementNetworkAddressRangeSize
    Int32 named Specifies the length of the IP address range used for network interfaces on the management network. If not specified, the value of 5 is assumed. This parameter is only relevant when the value of the network mode is StaticRange.
    optional
    ManagementNetworkFloatingIPAddress
    String named Specifies the floating IP used by the HA master cluster in the DHCP case. This parameter is optional and it's only relevant when the value of the network mode is DHCP.
    optional
    ManagementNetworkGateway
    String named Specifies the IPv4 address of the gateway for the management network. This parameter is only relevant when the value of the network mode is StaticRange.
    optional
    ManagementNetworkStartIPAddress
    String named Specifies the starting IP address in the range of IP addresses used for network interfaces on the management network. This parameter is only relevant when the value of the network mode is StaticRange.
    optional
    ManagementNetworkSubnetMask
    String named Specifies the subnet mask of the management network. This parameter is only relevant when the value of the network mode is StaticRange.
    optional
    MasterDnsNames
    String[] named Specifies a list of additional DNS names to associate with the Kubernetes API server. These DNS names are embedded in the Transport Layer Security (TLS) certificate presented by the API server. If not specified, no additional DNS names are embedded in the TLS certificate.
    optional
    MasterDnsSearchDomain
    String[] named Specifies a list of domains (for example "vmware.com") that you want to search when trying to look up a host name on Kubernetes API server specified in order of preference. If not specified, no default DNS search domains are set.
    optional
    MasterDnsServerIPAddress
    String[] named Specifies a list of DNS server IP addresses that you want to use on the Kubernetes API server specified in order of preference. If not specified, no default DNS servers are set.
    optional
    MasterNtpServer
    String[] named Specifies a list of NTP server DNS names or IP addresses that you want to use on the Kubernetes API server specified in order of preference. If not specified, VMware Tools based time synchronization is enabled.
    optional
    NsxEdgeClusterId
    String named Specifies the ID of the NSX Edge cluster that you want to use for Kubernetes Services of type LoadBalancer, Kubernetes Ingresses, and NSX SNAT.
    optional
    OpaqueSwitchName
    String named Specifies an NSX-T distributed switch used to connect this cluster to the overlay transport zone.
    optional
    RunAsync
    SwitchParameter named Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter, run "help About_RunAsync" in the VMware PowerCLI console.
    optional
    Server
    VIServer[] named Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet.
    optional
    WorkerDnsServer
    String[] named Specifies external DNS servers that you want to expose to the workloads. These DNS servers serve as the default fallback DNS servers to resolve domain names hosted outside of the Supervisor Cluster. If not specified, no default DNS servers are set.

    Output

    VMware.VimAutomation.WorkloadManagement.Types.V1.WMCluster

    Examples


    Example 1

    PS C:\> Enable-WMCluster "MyCluster" `
    -SizeHint Tiny `
    -ManagementVirtualNetwork (Get-VirtualNetwork "ManagementNetwork") `
    -ManagementNetworkMode Dhcp `
    -DistributedSwitch "NsxSwitch" `
    -NsxEdgeClusterId "a19ea5ea-3817-4394-83a7-55e4962c90f1" `
    -ServiceCIDR "10.96.0.0/24" `
    -PodCIDRs "10.244.0.0/21" `
    -ExternalIngressCIDRs "10.23.80.0/27" `
    -ExternalEgressCIDRs "10.23.80.0/27" `
    -EphemeralStoragePolicy "MyStoragePolicy1" `
    -ImageStoragePolicy "MyStoragePolicy2" `
    -MasterStoragePolicy "MyStoragePolicy3"

    Enables the workload management feature on the cluster "MyCluster". The management interfaces is attached to the network "ManagementNetwork". The management interfaces use Dynamic Host Configuration Protocol (DHCP) to configure its network stack. The vSphere distributed switch "NsxSwitch" provides the overlay networking. You must configure that switch in NSX-T to provide that prior to executing the above example. The NSX edge cluster with ID "a19ea5ea-3817-4394-83a7-55e4962c90f1" provides any higher level network functions that the vCenter system consumes in order to host the workloads.

    Example 2

    PS C:\> Get-WMCluster "MyCluster" | Enable-WMCluster `
    -SizeHint Tiny `
    -ManagementVirtualNetwork (Get-VirtualNetwork "ManagementNetwork") `
    -ManagementNetworkMode StaticRange `
    -ManagementNetworkStartIPAddress "10.23.83.89" `
    -ManagementNetworkAddressRangeSize 5 `
    -ManagementNetworkGateway "10.23.83.253" `
    -ManagementNetworkSubnetMask "255.255.252.0" `
    -OpaqueSwitchName "my-nvds" `
    -NsxEdgeClusterId "a19ea5ea-3817-4394-83a7-55e4962c90f1" `
    -ServiceCIDR "10.96.0.0/24" `
    -PodCIDRs "10.244.0.0/21" `
    -ExternalIngressCIDRs "10.23.87.0/27" `
    -ExternalEgressCIDRs "10.23.88.0/27" `
    -EphemeralStoragePolicy "MyStoragePolicy1" `
    -ImageStoragePolicy "MyStoragePolicy2" `
    -MasterStoragePolicy "MyStoragePolicy3" `
    -ContentLibrary "MyContentLibrary" `
    -WorkerDnsServer "10.23.108.1" `
    -DefaultImageRegistryHostname "myrepository.example.com" `
    -DefaultImageRepository "myrepo" `
    -MasterDnsNames "myk8s.example.com" `
    -MasterDnsServerIPAddress @("10.23.0.1","10.23.0.2") `
    -MasterNtpServer @("10.23.0.3") `
    -MasterDnsSearchDomain "example.com"

    Enables the workload management feature on the cluster "MyCluster". The management interfaces are attached to the network "ManagementNetwork". The management interfaces use static network configuration. The NSX-T distributed switch "my-nvds" provides the overlay networking. You must configure that switch in NSX-T in advance to provide that prior to executing the above example. The NSX edge cluster with ID "a19ea5ea-3817-4394-83a7-55e4962c90f1" provides any higher level network functions that the vCenter system consumes in order to host the workloads.

    Related Commands

    Feedback

    Was this page helpful?