Skip to main content

Connect a Managed Kubernetes cluster on a cloud server with other Servercore products

Create a network with a dedicated server

Use a Servercore global router to organize network connectivity between Managed Kubernetes clusters on a cloud server and a dedicated server.

  1. Create a global router.

  2. Connect a network and subnet to the global router to the cloud platform project where the Managed Kubernetes cluster is located.

  3. Create a cloud router. When creating it, check the Connect router to internet checkbox.

  4. Connect the subnet that you connected to the Global Router in step 2 to the Cloud Router.

  5. For the subnet that you connected to the Cloud Router in step 4, check the allocated address pool (the allocation_pool parameter in the command output):

    openstack subnet show <subnet_ID>

    Specify <subnet_ID> — the subnet ID; you can view it using openstack subnet list.

  6. Exclude the Cloud Router IP address from the address pool. To do this, delete the address pool allocated for the subnet and add a new pool without the Cloud Router IP address:

    openstack subnet set --no-allocation-pool \
    --allocation-pool start=<first_pool_IP>,end=<last_pool_IP> \
    <subnet_ID>

    Specify:

    • <first_new_pool_IP> — the first IP address from the new pool; ;
    • <last_new_pool_IP> — the last IP address from the new pool; ;
    • you can add multiple pools, each added using the --allocation-pool start=<first_pool_IP>,end=<last_pool_IP> option;.
  7. Set the cloud router IP address as the default gateway so that traffic is sent to the cloud router:

    openstack subnet set --gateway <cloud_router_IP> <subnet_ID>

    Specify <cloud_router_IP> — the cloud router IP address.

  8. Check that the gateway_ip parameter in the command output corresponds to the cloud router IP address:

    openstack subnet show <subnet_ID>

    Note that in the control panel, in the top menu ProductsGlobal Router, the subnet will show the old gateway.

  9. To configure connectivity with a dedicated server, add static routes. To do this, create a ticket and specify the following in it:

    • Project ID. You can find it in the Control Panel: open the projects menu (the name of the current project) and copy the project ID;
    • The ID of the subnet you connected to the Cloud Router in step 4. You can find it in the Control Panel: in the top menu, click ProductsGlobal Router → the router page → open the network block → in the subnet row, copy the value in the UUID column;
    • The IP address chosen as the subnet gateway on the Global Router. You can find it in the Control Panel: in the top menu, click ProductsGlobal Router → the router page → open the network block → in the subnet row, copy the value in the Gateway column;
    • CIDR of the destination subnet with the dedicated server.
  10. Create a Managed Kubernetes cluster. During creation, in the Network block, select the one you connected to the Cloud Router in step 4.

Create a network with a cloud server

In one project

  1. Create a private network and subnet.
  2. Connect the private subnet to the Cloud Router.
  3. Create a Managed Kubernetes cluster and, as the subnet, select the private subnet you created in step 1.
  4. Add cloud servers to the subnet.

Between projects

If the cloud servers and cluster are in different projects, you need to make the private network of one project available to another project — such a network is called cross-project.

  1. Create a private network and subnet.
  2. Connect the private subnet to the Cloud Router.
  3. Create a Managed Kubernetes cluster and, as the subnet, select the private subnet you created in step 1.
  4. Configure access to a private network in different projects.
  5. In the target project, add cloud servers to the subnet.

Create a network with Managed Databases

You can network a Managed Kubernetes cluster and a Managed Database cluster in the same way as a cloud server — in one project and between projects.