Register Services
NetQ must register with the NMX-T and NMX-C services to begin receiving network telemetry and control data. Communication between these services is secured using certificate-based mTLS encryption.
These certificates are automatically created during the installation process, but you must configure them on the switch trays hosting NMX-C and NMX-T. Alternately, you can provide your own certificates.
You can also perform the steps outlined on this page using the /v1/switch-profiles endpoint. Refer to NVLink Bringup for more information.
Secure Devices with Certificates
You can configure NetQ NVLink devices to use either NetQ NVLink’s self-signed certificate or your own certificates. If you are using your own certificates, upload the CA certificate first, followed by the server certificate, and finally the switch certificate.
- Use SSH to log in to the master node of your NetQ NVLink deployment. This is the node you used during the initial installation.
ssh nvidia@<IP_Address>
- Run the
/opt/netq-admin/nvl/scripts/create-certificate.shscript as the root user. When prompted, provide a certificate name (typically the switch’s hostname or IP address):
nvidia@ubuntu:~$ su
root@ubuntu:/home/nvidia# /opt/netq-admin/nvl/scripts/create-certificate.sh example
certificate.cert-manager.io/example-certificate created
Certificate is ready after 10 seconds.
Extracting secret data to local files...
Files created:
-rw-r--r-- 1 root root 1094 May 29 11:57 example-ca.crt
-rw-r--r-- 1 root root 1424 May 29 11:57 example-tls.crt
-rw-r--r-- 1 root root 3243 May 29 11:57 example-tls.key
-rw------- 1 root root 3907 May 29 11:57 example-tls.p12
Done.
- Copy the
.crtand.p12files to the switch tray. Use the NVOS cluster manager commands to apply the certificates to both NMX-C and NMX-T.
-
Ensure that you do not already have a certificate installed by making a GET request to the
/v1/certificates/endpoint. -
Upload your certificates by making a POST request to the
/v1/certificates/caendpoint. In the request body, specify the file. The certificate must be in PEM format and end in.crt. If successful, the response body includes metadata about the certificate including its expiration date.
-
Ensure that you do not already have a server certificate installed by making a GET request to the
/v1/certificates/endpoint. -
Upload your certificates by making a POST request to the
/v1/certificates/serverendpoint. In the request body, specify the.crtand.keyfiles. If successful, the response body includes metadata about the certificate including its expiration date.
-
Ensure that you do not already have a switch certificate installed by making a GET request to the
/v1/certificates/endpoint. -
Upload your certificates by making a POST request to the
/v1/certificates/switchendpoint. In the request body, specify the.p12file. If successful, the response body includes metadata about the certificate including its expiration date. -
Perform an NVLink Bringup by making a POST request to the
/v1/bring-up/endpoint, and specify the switch.p12file in the request body.
Register Services
Register the services by making a POST request to the v1/services endpoint.
curl --request POST \
--url https://<ip_address>/nmx/v1/services \
--header 'Authorization: Basic cnctdXNlcjpOdmlkaWExMg==' \
--header 'Content-Type: application/json' \
--data '{
"Name": "Registration,
"Description": "Example registration to controller",
"ServiceType": "CONTROLLER",
"ServiceConnectionInformation": {
"Address": "10.188.47.166",
"PortNumber": 9370
}
}'
Check the Status of a Registered Service
To retrieve the status of all registered services, make a GET request to the v1/services endpoint.
curl --request GET \
--url https://<ip_address>/nmx/v1/services \
--header 'Authorization: Basic cnctdXNlcpOdmlkaWExMg=='
You can add a filter to the response to retrieve either telemetry or controller services exclusively:
curl --request GET \
--url https://<ip_address>/nmx/v1/services \TELEMETRY&offset=0&limit=1' \\
--header 'Authorization: Basic cnctdXNlcpOdmlkaWExMg=='
Remove a Registered Service
NetQ NVLink includes a failover mechanism that transfers services to a secondary IP address in case the primary IP address is unavailable. Before you can remove a registered service, you must disable the failover feature.
- Run the following command to view the NetQ NVLink configuration file:
kubectl edit cm -n netq-nvl common-config
-
Locate the
feature-flagssection. Change theservice-failover-enabledvalue fromtruetofalse. -
Make a
DELETErequest to thev1/servicesendpoint.