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.
-
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.
-
If you plan to use OpenStack CLI to create or verify the load balancer:
- Make sure that the OpenStack client with the
octaviaandneutronpackages is installed. - Pass authentication in the project.
- Make sure that the OpenStack client with the
-
Install the cURL utility, if it is not installed yet.
-
Get the Octavia service endpoint. In this example:
https://public.infra.mail.ru:9876. -
Get the
X-Auth-TokenAPI access token. -
Find out the IDs of the network and subnet in which you want to create the load balancer.
-
Get a list of configuration templates:
curl -X GET -H "X-Auth-Token: <TOKEN>" https://public.infra.mail.ru:9876/v2.0/lbaas/flavorsHere
<TOKEN>is the API access token. -
Write down the
flavor_idvalue. Example:8f94060c-8d5b-4472-9cfd-e8a2b909481d.
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.
-
Go to the VK Cloud management console.
-
Select the project.
-
Go to Virtual networks → Load balancers.
A list of load balancers will be displayed.
-
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.
If the created load balancer is no longer needed, delete it.