New-WMNamespaceNetworkSpec

Creates a specification for a namespace network. The specification is later used to create the actual namespace network.

Syntax

-AddressRanges  <String[]>
-DistributedPortGroup  <VDPortgroup>
-Gateway  <String>
-Name  <String>
-Subnet  <String>
[-Server  <VIServer[]>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
AddressRanges
String[] named Specifies one or more strings representing an IP address range in the format "start IP - end IP". For example, "192.169.10.100 - 192.169.10.200".
required
DistributedPortGroup
VDPortgroup named Specifies the distributed portgroup that handles the Kubernetes workload traffic.
required
Gateway
String named Specifies the gateway of the network.
required
Name
String named Specifies a unique name within the cluster. This must be an alphanumeric (a-z and 0-9) string, with a maximum length of 63 characters. You can use the hyphen (-) anywhere except for the first or last symbol.
required
Subnet
String named Specifies the subnet mask of the network.
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.

Output

VMware.VimAutomation.WorkloadManagement.Types.V1.WMNamespaceNetworkSpec

Examples


Example 1

PS C:\> $primaryWorkloadNetworkSpec = New-WMNamespaceNetworkSpec `
-Name "network-1" `
-Gateway "192.168.10.1" `
-Subnet "255.255.255.0" `
-AddressRanges "192.168.10.50-192.168.10.99" `
-DistributedPortGroup "Management Network"
PS C:\> Get-Cluster "MyCluster" | Enable-WMCluster `
-SizeHint Tiny `
-ManagementVirtualNetwork (Get-VirtualNetwork "VM Network" ) `
-ManagementNetworkMode Dhcp `
-ServiceCIDR "10.96.0.0/24" `
-EphemeralStoragePolicy "MyStoragePolicy1" `
-ImageStoragePolicy "MyStoragePolicy2" `
-MasterStoragePolicy "MyStoragePolicy3" `
-ContentLibrary "cl1" `
-HAProxyName "HAProxy1" `
-HAProxyAddressRanges "192.168.10.50-192.168.10.99" `
-HAProxyUsername "HAProxy1AdminUser" `
-HAProxyPassword "pass" `
-HAProxyDataPlaneAddresses "HAProxy1DataPlane:443" `
-HAProxyServerCertificateChain "-----BEGIN CERTIFICATE-----...........-----END CERTIFICATE-----" `
-PrimaryWorkloadNetworkSpecification $primaryWorkloadNetworkSpec

Creates a specification for a workspace network backed by a distributed portgroup. The specification is then passed to Enable-WMCluster which creates a namespace network that can later be used by the workloads.

Related Commands

Feedback

Was this page helpful?