VK Cloud logo

Creating a load balancer with a custom configuration template

Load balancers in VK Cloud are created by default with a standard configuration template. To handle increased traffic volumes, use a load balancer with a more powerful configuration.

In VK Cloud, you can add load balancers with a configuration template (flavor) created specifically for you to your infrastructure. This allows you to increase infrastructure performance under high load.

A more powerful configuration template is created by VK Cloud specialists after agreeing on technical details.

Preparatory steps

  1. Contact your VK Cloud manager or presale architect with a request to create a custom template, if this has not been done yet. After agreeing on the details, you will receive information about the configuration template created for you.

  2. If you plan to use OpenStack CLI to create or verify the load balancer:

    1. Make sure that the OpenStack client with the octavia and neutron packages is installed.
    2. Pass authentication in the project.
  3. Install the cURL utility, if it is not installed yet.

  4. Get the Octavia service endpoint. In this example: https://public.infra.mail.ru:9876.

  5. Get the X-Auth-Token API access token.

  6. Find out the IDs of the network and subnet in which you want to create the load balancer.

1. Get information about flavors

  1. Get a list of configuration templates:

    curl -X GET -H "X-Auth-Token: <TOKEN>" https://public.infra.mail.ru:9876/v2.0/lbaas/flavors

    Here <TOKEN> is the API access token.

  2. Write down the flavor_id value. Example: 8f94060c-8d5b-4472-9cfd-e8a2b909481d.

2. Create a load balancer with a custom flavor

Make an API request to create a load balancer with the desired flavor. Pass the parameters you need in the request. Example request:

curl -X POST -H "Content-Type: application/json" -H "X-Auth-Token: <TOKEN>" -d '{"loadbalancer": {"description": "<LOAD_BALANCER_DESCRIPTION>", "admin_state_up": true, "project_id": "<PROJECT_ID>", "flavor_id": "<FLAVOR_ID>", "vip_subnet_id": "<SUBNET_ID>", "vip_address": "<VIP>", "provider": "octavia", "name": "<LOAD_BALANCER_NAME>", "vip_qos_policy_id": "<QoS_POLICY_ID>", "availability_zone": "<AVAILABILITY_ZONE>", "tags": ["<TAG>"]}}' https://public.infra.mail.ru:9876/v2/lbaas/loadbalancers

Here are the required values:

  • <TOKEN> — the API access token.
  • <FLAVOR_ID> — the ID of the load balancer configuration template, obtained from VK Cloud or on your own.
  • <SUBNET_ID> — the ID of the subnet in which you want to place the load balancer.
  • <LOAD_BALANCER_NAME> — an arbitrary name for the load balancer being created.

Optional values:

  • <LOAD_BALANCER_DESCRIPTION> — an arbitrary description of the load balancer being created.
  • <PROJECT_ID> — the ID of the OpenStack project in which you want to create the load balancer.
  • <VIP> — the virtual IP address assigned to the load balancer.
  • <QoS_POLICY_ID> — the ID of the QoS policy that you want to assign to the load balancer.
  • <AVAILABILITY_ZONE> — the name of the availability zone in which you want to place the load balancer.
  • <TAG> — the tag with which you want to mark the load balancer.

For more information about the load balancer API, see the official OpenStack documentation.

3. Verify the creation and parameters of the load balancer

  1. Go to the VK Cloud management console.

  2. Select the project.

  3. Go to Virtual networks → Load balancers.

    A list of load balancers will be displayed.

  4. Click the name of the desired load balancer.

    A page with detailed information about it will open. On this page, you can also edit the load balancer parameters.

After the load balancer is successfully created, you can manage it.

Delete unused resources

If the created load balancer is no longer needed, delete it.

Was this article helpful?