Skip to main content

Connect a Managed Kubernetes cluster on a cloud server to 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 global router subnet to the cloud router.

  5. For the created global router subnet, view the allocated address pool (the allocation_pool parameter in the command output):

    openstack subnet show <subnet_ID>

    Specify <subnet_ID> — the global router subnet ID, which can be viewed 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 global router 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 — in the control panel, open the list of projects in the Project field and copy the project ID; ;
    • Global router subnet ID — in the control panel, in the top menu click Products and select Global Router. On the router page, open the network block, find the required subnet, and copy the value in the UUID column;
    • IP address chosen as the subnet gateway on the global router — in the control panel, in the top menu click Products and select Global Router. On the router page, open the network block, find the required subnet, and copy the value in the Gateway column;
    • CIDR of the destination subnet with the dedicated server.
  10. Create a Managed Kubernetes cluster. During creation, select the global router subnet in the Network block.

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 select the private subnet created in step 1 as the subnet.
  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 select the private subnet created in step 1 as the subnet.
  4. Configure access to the private network across different projects.
  5. In the target project, add cloud servers to the subnet.

Create a network with Managed Databases

Networking a Managed Kubernetes cluster and a Managed Database cluster can be done in the same way as a cloud server — in the same project and between projects.