Skip to content

Manage Virtual Servers

What are Virtual Servers?

n2x.io Virtual Servers deliver cloud-agnostic load balancing, distributing traffic across diverse environments including multi-cloud deployments and on-premises infrastructure. Additionally, they provide advanced functionalities like SSL termination and health checks, improving application security and performance.

Virtual Servers let you configure your custom domain to access your publicly exposed applications or services. Simply add a CNAME record in your DNS server pointing to the FQDN (Fully Qualified Domain Name) provided during the Virtual Server creation process.

To successfully configure a Virtual Server, follow these two steps:

  1. Select an existing network and create a Virtual Server within it.
  2. Add Node Services to the Virtual Server.

Info

Node Services are the resources that receive traffic distributed by the Virtual Server.

Create a Virtual Server

Warning

Only Account Administrators or Admin Users can manage virtual servers.

You can create a virtual server using the n2x.io webUI or CLI (n2xctl):

In the navigation menu on the left, click Virtual Servers and follow these steps:

  1. Select the Tenant from the available list.
  2. Select the Network where to create the Virtual Server.
  3. Click on the + Add Virtual Server button.

    Virtual Server form.

  4. Enter the Name and Description.

  5. You can add a custom CNAME (Optional).
  6. The Identity-Aware Proxy Authentication checkbox lets you enable or disable IAP for your virtual server. To learn more about this feature, click here.
  7. Assign the tags to your virtual server. These tags can be used by various features, such as Identity-Aware Proxy (IAP) authentication.
  8. Click on the Add New Virtual Server button.

Use the following command to create a subnet:

n2xctl vs create

Select the Tenant, Network and follow these steps:

  1. Enter the Name and Description.
  2. You can add a custom CNAME (Optional).
  3. Authentication field enable or disable Identity-Aware Proxy Authentication for the virtual server. To learn more about this feature, click here.
  4. Assign the tags to your virtual server. These tags can be used by various features, such as Identity-Aware Proxy (IAP) authentication.
  5. Add node app svc to virtual serverfiled, simplifies virtual server configuration by allowing you to add node services to your virtual server in a single step.
$ n2xctl vs create
n2xctl v0.0.3-20240725171430+88c4863--go1.22.5

n2xctl is a CLI to control the n2x SASE platform.

Find more information at https://n2x.io/docs

ยป Tenant: [demo] Demo tenant
ยป Network: [net-172-16] Demo
ยป VS Name: demo-vs
ยป Description: Demo Virtual Service
ยป Custom DNS CNAME: 
ยป Authentication: No
ยป Tags: nginx
ยป Add node app svc to virtual server? No
                                                โ”€โ”€โ”€โ”€โ”€ Virtual Server Details โ‰ก
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
Virtual Server Information
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

VS ID               xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx    
Tenant ID           xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Name                demo-vs                                 
Description         Demo Virtual Service                    
Connectivity Zone   eu-south                                
Authentication      [no]                                    

Tags
โ”€โ”€โ”€โ”€

 โ–  nginx


-> URL: https://xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.eu-south.iap.n2x.io

Tip

If a CNAME is not provided, a URL will be created for you with the format: https://xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.<network-connectivity-zone>.iap.n2x.io

Add Node Services to Virtual Servers

Warning

Only Account Administrators or Admin Users can manage virtual servers.

You can add node services to virtual servers either using the n2x.io webUI or CLI (n2xctl):

In the navigation menu on the left, click Virtual Servers and follow these steps:

  1. Select the Tenant from the available list.
  2. Select the Network.
  3. Select the Virtual Server where add the node service.
  4. Click on the + Add Node Service button.

    Add Node Service form.

  5. Select the desired Subnet from the available list.

  6. Select the desired Node from the available list.
  7. Enter Protocol and Port of node service.
  8. Click on the Add Node Service button.

Use the following command to add node services to virtual servers:

n2xctl vs add-node-svc

Configure a Virtual Server with a Node Service:

  1. Select the desired Virtual Service from the available list.
  2. Confirm Node Service Addition: When prompted with the question "Add node appSvc to virtual server?", type yes to proceed.
  3. Choose the desired Tenant from the available list.
  4. Select the desired Node from the available list.
  5. Enter the Protocol used by the node service (HTTP/HTTPS).
  6. Enter the Port number on which the node service listens for traffic.
$ n2xctl vs add-node-svc
n2xctl v0.0.3-20240725171430+88c4863--go1.22.5

n2xctl is a CLI to control the n2x SASE platform.

Find more information at https://n2x.io/docs

ยป VS: [demo-vs] Demo Virtual Service
ยป Add node appSvc to virtual server? Yes
ยป Tenant: [demo] Demo tenant
ยป Node: [nginx-depl-7db98588fd-bdxm4] [k8s-pod] nginx-depl
ยป Protocol: HTTP
ยป App Svc Port: 80
                                                โ”€โ”€โ”€โ”€โ”€ Virtual Server Details โ‰ก
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
Virtual Server Information
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

VS ID               xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Tenant ID           xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Name                demo-vs                                 
Description         Demo Virtual Service                    
Connectivity Zone   eu-south                                
Authentication      [no]                                    

Node App Services
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

Tenant  Subnet              Node                                Proto   Port    
------  ------              ----                                -----   ----    
demo    subnet-172-16-15    nginx-depl-7db98588fd-bdxm4         TCP     80      

Tags
โ”€โ”€โ”€โ”€

 โ–  nginx


-> URL: https://xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.eu-south.iap.n2x.io

Delete Node Services from a Virtual Service

Warning

Only Account Administrators or Admin Users can manage virtual servers.

You can delete node services from a virtual service either using the n2x.io webUI or CLI (n2xctl):

In the navigation menu on the left, click Virtual Servers and follow these steps:

Delete Node Service.

  1. Select the desired Virtual Service from the available list.
  2. Click on the bin icon of Node to delete.
  3. Confirm the deletion.

Use the following command to delete node services from a virtual service:

n2xctl vs remove-node-svc

The command will typically prompt you to:

  1. Select the Virtual Service you want to modify.
  2. Choose the Node Service you want to delete from the available list.
$ n2xctl vs remove-node-svc
n2xctl v0.0.3-20240725171430+88c4863--go1.22.5

n2xctl is a CLI to control the n2x SASE platform.

Find more information at https://n2x.io/docs

ยป VS: [demo-vs] Demo Virtual Service
ยป Remove node appSvc: [nginx-01] port 8000
                                                โ”€โ”€โ”€โ”€โ”€ Virtual Server Details โ‰ก
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
Virtual Server Information
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

VS ID               xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Tenant ID           xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Name                demo-vs                                 
Description         Demo Virtual Service                    
Connectivity Zone   eu-south                                
Authentication      [no]                                    

Tags
โ”€โ”€โ”€โ”€

 โ–  nginx


-> URL: https://xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.eu-south.iap.n2x.io

Delete a Virtual Server

Warning

Only Account Administrators or Admin Users can manage virtual servers.

You can delete a virtual server from your network either using the n2x.io webUI or CLI (n2xctl):

In the navigation menu on the left, click Virtual Servers and follow these steps:

Delete Virtual Server.

  1. Select the desired Virtual Service from the available list.
  2. Click on the icon.
  3. Click on the Delete virtual servers... button.

Note

Confirmation is requested before deleting a virtual server.

Use the following command to delete a virtual server from your network:

n2xctl vs delete

Select the Virtual Service you want to delete and confirm the deletion.

$ n2xctl vs delete
n2xctl v0.0.3-20240725171430+88c4863--go1.22.5

n2xctl is a CLI to control the n2x SASE platform.

Find more information at https://n2x.io/docs

ยป VS: [test2] test load balancer

ยป Confirm deletion? Yes

   Done