Connect a Managed Kubernetes cluster on a dedicated server to other Selectel products
A global router is used to set up network connectivity between a cluster on a dedicated server and other Selectel products. When creating a cluster on a dedicated server, a global router is created automatically. This is a service router that connects the dedicated server and the cloud platform resources required for the Managed Kubernetes cluster to function.
The process of setting up network connectivity depends on whether you are using other global routers:
- if you are not yet using a global router, you can connect products using a service global router;
- if your account already has a global router network, you can connect products by merging global routers.
You can view the list of routers in the Control panel: on the top menu, click Products and select Global Router. The service global router is named <cluster_name>-l3vpn, where <cluster_name> is the cluster name.
Connect products using a service global router
- Connect networks and subnets to a global router for every VLAN and project whose products and services you want to connect. For Cloud powered by VMware, you can only add networks and subnets via technical support.
- Specify routes on devices.
1. Connect networks and subnets to a global router
Dedicated server
Cloud platform
Use for a dedicated or hosted server.
You can connect a new network to the router or an existing network if it is not already connected to any of the account's global routers.
-
In the Control panel, on the top menu, click Products and select Global Router.
-
Open the router page → Networks tab. The service global router is named
<cluster_name>-l3vpn, where<cluster_name>is the cluster name. -
Click Create network.
-
Enter a network name. It will only be used in the control panel.
-
Select the Servers and Hardware service.
-
Select the location of the network.
-
Select or enter a VLAN.
-
If you want to create a network to an internal segment (Q-in-Q), specify its tag — a number from 2 to 4094. If there is already a network for the VLAN, be sure to specify the Q-in-Q segment of this VLAN.
-
Enter a subnet name. It will only be used in the control panel.
-
Enter the CIDR — the private subnet IP address and mask. You can enter a new subnet or an existing private server subnet if it has not already been added to any of the global routers in the account. The subnet must meet the following conditions:
- belong to the RFC 1918 private address range:
10.0.0.0/8,172.16.0.0/12or192.168.0.0/16; - not overlap with the
10.10.0.0/16,10.96.0.0/12,10.222.0.0/16,10.250.0.0/16,10.251.0.0/24and172.250.0.0/14. These ranges are used for internal addressing in Managed Kubernetes, their use may lead to conflicts in the global router network; - have a size of at least
/29, as three addresses will be occupied by Selectel network equipment; - do not overlap with other subnets added to this router — there must be no identical IP addresses in the subnets of one router.
-
Enter the gateway IP or leave the default first address from the subnet. Do not assign this address to your devices to avoid network disruption.
-
Enter the service IPs or leave the default last addresses from the subnet. Do not assign these addresses to your devices to avoid network disruption.
-
Click Create network.
-
Optional: check the network topology on the global router. In the Control panel, on the top menu, click Products → Global Router → router page → Network map.
-
If you specified a Q-in-Q tag, ensure you have configured Q-in-Q. When configuring, use the subnet you specified in step 10.
2. Specify routes on devices
Specify routes from the cluster to all devices in the network and from all devices in the network to the cluster.
Dedicated server, Cloud powered by VMware
Cloud platform
Ubuntu
Debian
CentOS
Windows
-
Open the network configuration file:
vi /etc/netplan/01-netcfg.yaml -
At the end of the data block for the required network interface, add the route:
routes:- to: <ip_address>/<mask>via: <gateway>Specify:
<ip_address>/<mask>— the subnet to which you need to add a route, specifying the mask, for example192.168.0.0/28;<gateway>— the gateway for the current server's subnet, which is specified on the global router.
-
If you need to define multiple routes, add them sequentially in the same block, for example:
routes:- to: 192.168.0.0/28via: 172.16.0.1- to: 192.168.1.0/28via: 172.16.0.1 -
Save the file.
-
Check the settings:
sudo netplan try -
Apply the changes:
netplan apply
Connect products by merging global routers
1. Merge global routers
- Ensure that the subnets of the routers being connected do not overlap — the IP addresses of each subnet must not match the IP addresses of other subnets. You can view the list of subnets in the Control panel: in the top menu, click Products → Global Router → router page → Networks tab.
- Create a ticket. In the ticket, specify the IDs of the global routers that need to be connected. You can copy the router ID in the Control panel: on the top menu, click Products → Global Router → router page → copy the ID under the router name.
- Wait for a response in the ticket that the global routers have been merged.
2. Specify routes on devices
Specify routes from the cluster to all devices in the network and from all devices in the network to the cluster.
Dedicated server, Cloud powered by VMware
Cloud platform
Ubuntu
Debian
CentOS
Windows
-
Open the network configuration file:
vi /etc/netplan/01-netcfg.yaml -
At the end of the data block for the required network interface, add the route:
routes:- to: <ip_address>/<mask>via: <gateway>Specify:
<ip_address>/<mask>— the subnet to which you need to add a route, specifying the mask, for example192.168.0.0/28;<gateway>— the gateway for the current server's subnet, which is specified on the global router.
-
If you need to define multiple routes, add them sequentially in the same block, for example:
routes:- to: 192.168.0.0/28via: 172.16.0.1- to: 192.168.1.0/28via: 172.16.0.1 -
Save the file.
-
Check the settings:
sudo netplan try -
Apply the changes:
netplan apply