Registering an Avi Load Balancer cluster with an NSX Manager instance
search cancel

Registering an Avi Load Balancer cluster with an NSX Manager instance

book

Article ID: 373497

calendar_today

Updated On:

Products

VMware Avi Load Balancer

Issue/Introduction

Avi Load Balancer requires to be registered with the NSX Manager in order to use Avi Load Balancer for Load Balancing services in a vSphere IaaS control plane environment (vSphere with Kubernetes, formerly know as TKGs).

The described issue is present when the following conditions are true:

● The Avi Controller Cluster was not deployed from the NSX Manager (non-VCF environments)

● The Avi Load Balancer was deployed on a VI-WLD using the VCF SDDC Manager (VCF 5.2 or higher). This procedure is not necessary for Avi Load Balancer deployed on the Management Domain

Resolution

Register the Avi Load Balancer cluster with the corresponding NSX Manager by applying the following steps:

1. Collect the following information:


a. NSX Manager IP Address / WLD NSX Mgr Ip for VCF environments
(<nsx_mgr_ip>)
b. Avi Load Balancer Cluster IP Address (<cluster_ip>)
c. Avi Load Balancer admin username (<infra_admin_username>)
d. Avi Load Balancer admin password (<infra_admin_password>)
e. DNS Servers (<dns_servers>) [[Optional]]
f. NTP servers (<ntp_servers>) [[Optional]]

 

2. Replace in the following body with the information collected on Step 1.

'{
"owned_by": "LCM",
"cluster_ip": "<cluster_ip>",
"infra_admin_username" : "<infra_admin_username>",
"infra_admin_password" : "<infra_admin_password>",
"dns_servers": ["<dns_servers>"],
"ntp_servers": ["<ntp_servers>"]
}

 

3. Use your preferred tool to make the API call. An example using curl is provided below:

curl -k --location --request PUT 'https://10.187.129.114/policy/api/v1/infra/albonboarding-workflow' \
--header 'X-Allow-Overwrite: True' \
--header 'Authorization: Basic YWRtaW46QWRtaW4hMjNBZG1pbg==' \
--header 'Content-Type: application/json' \
--data-raw '{
"owned_by": "LCM",
"cluster_ip": "10.187.143.184",
"infra_admin_username" : "admin",
"infra_admin_password" : "ca$hc0w",
"dns_servers": ["10.162.204.1"],
"ntp_servers": ["10.162.204.1"]
}'

 

Example Response:
{
 "connection_info": {
 "username": "nsxt-alb",
 "tenant": "admin",
 "expires_at": "2021-08-30T23:47:58.275Z",
 "enforcement_point_address": "10.187.143.184",
 "resource_type": "AviConnectionInfo",
 "certificate": "-----BEGIN CERTIFICATE-----\n CERTIFICATE VALUE \n-----
END CERTIFICATE-----\n"
 },
 "auto_enforce": true,
 "resource_type": "EnforcementPoint",
 "id": "alb-endpoint",
 "display_name": "alb-endpoint",
 "path": "/infra/sites/default/enforcement-points/alb-endpoint",
 "relative_path": "alb-endpoint",
 "parent_path": "/infra/sites/default",
 "unique_id": "1ae2d4e8-9019-4ca4-840c-d0b42b4843bd",
 "realization_id": "1ae2d4e8-9019-4ca4-840c-d0b42b4843bd",
 "marked_for_delete": false,
 "overridden": false,
 "_system_owned": false,
 "_create_user": "admin",
 "_create_time": 1630345678736,
 "_last_modified_user": "admin",
 "_last_modified_time": 1630345678736,
 "_protection": "NOT_PROTECTED",
 "_revision": 0
}

 

4. Verify the Load Balancer used with NSX Networking
To ensure that the registration went through, the response from the NSX manager
should be verified.
Use the following GET query to check that the enforcement point is in place.

 

GET https://<nsx-mgr-ip>/policy/api/v1/infra/sites/default/enforcement-points/<endpoint name>

Example:
root@nsx-manager:~# curl -k -u 'admin:VMware1!VMware1!' --location --request GET
https://192.168.68.30/policy/api/v1/infra/sites/default/enforcement-points/albendpoint
{
 "connection_info" : {
 "username" : "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000",
 "tenant" : "admin",
 "expires_at" : "2024-07-25T21:00:05.679Z",
 "managed_by" : "LCM",
 "status" : "DEACTIVATE_PROVIDER",
 "certificate" : "-----BEGIN CERTIFICATE-----\nMIIC3TC===Omitted===iU=\n-----END
CERTIFICATE-----\n",
 "is_default_cert" : true,
 "enforcement_point_address" : "192.168.68.61",
 "resource_type" : "AviConnectionInfo"
 },
 "auto_enforce" : true,
 "resource_type" : "EnforcementPoint",
 "id" : "alb-endpoint",
 "display_name" : "alb-endpoint",
 "path" : "/infra/sites/default/enforcement-points/alb-endpoint",
 "relative_path" : "alb-endpoint",
 "parent_path" : "/infra/sites/default",
 "remote_path" : "",
 "unique_id" : "59929339-13d3-450d-97df-acf48e1c98ad",
 "realization_id" : "59929339-13d3-450d-97df-acf48e1c98ad",
 "owner_id" : "09a55836-14dd-4768-b366-460f03253ea6",
 "marked_for_delete" : false,
 "overridden" : false,
 "_system_owned" : false,
 "_create_time" : 1715813282536,
 "_create_user" : "admin",
 "_last_modified_time" : 1721919605807,
 "_last_modified_user" : "system",
 "_protection" : "NOT_PROTECTED",
 "_revision" : 353

 


References:

https://vdc-download.vmware.com/vmwb-repository/dcr-public/201a09cb-5610-49e6-9d31-7db0920e3a65/65f199d6-8516-4092-9b19-906559f972b5/api_includes/method_InitiateAlbOnBoardingWorkflow.html