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:
- Select an existing network and create a Virtual Server within it.
- 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:
- Select the
Tenant
from the available list. - Select the
Network
where to create theVirtual Server
. -
Click on the
+ Add Virtual Server
button. -
Enter the
Name
andDescription
. - You can add a custom
CNAME
(Optional). - The
Identity-Aware Proxy Authentication
checkbox lets you enable or disable IAP for your virtual server. To learn more about this feature, click here. - Assign the
tags
to your virtual server. These tags can be used by various features, such as Identity-Aware Proxy (IAP) authentication. - 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:
- Enter the
Name
andDescription
. - You can add a custom
CNAME
(Optional). Authentication
field enable or disable Identity-Aware Proxy Authentication for the virtual server. To learn more about this feature, click here.- Assign the
tags
to your virtual server. These tags can be used by various features, such as Identity-Aware Proxy (IAP) authentication. Add node app svc to virtual server
filed, 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:
- Select the
Tenant
from the available list. - Select the
Network
. - Select the
Virtual Server
where add the node service. -
Click on the
+ Add Node Service
button. -
Select the desired
Subnet
from the available list. - Select the desired
Node
from the available list. - Enter
Protocol
andPort
of node service. - 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
:
- Select the desired
Virtual Service
from the available list. - Confirm Node Service Addition: When prompted with the question "Add node appSvc to virtual server?", type
yes
to proceed. - Choose the desired
Tenant
from the available list. - Select the desired
Node
from the available list. - Enter the
Protocol
used by the node service (HTTP/HTTPS). - 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:
- Select the desired
Virtual Service
from the available list. - Click on the
bin
icon ofNode
to delete. - 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:
- Select the
Virtual Service
you want to modify. - 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:
- Select the desired
Virtual Service
from the available list. - Click on the icon.
- 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