You can add an existing Tier-1 gateway to a specific Edge Cluster with the NSX Policy SDK for PowerShell by using the Invoke-PatchTier1LocaleServices cmdlet.
Procedure
- Retrieve the Edge Cluster information.
$edgeClusters = Invoke-ListEdgeClustersForEnforcementPoint -SiteId default -EnforcementPointId default
$edgeCluster = $edgeClusters.Results | where {$_.Displayname -eq $edgeClusterName}
- Create a client-side object for locale service with the Edge Cluster path.
$localeService = Initialize-LocaleServices -EdgeClusterPath $edgeCluster.Path -DisplayName default -Id default
- Invoke the operation.
Invoke-PatchTier1LocaleServices -Tier1Id $T1.Id -LocaleServices $localeService -LocaleServicesId default