- Home
- API Enriched
- Telemetry And Insights
- discovery
- Create TCP load balancer.
Create TCP load balancer.
const url = 'https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/discovery/namespaces/example/discovered_services/example/create_tcp_load_balancer';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"name":"example","namespace":"example","tcp_lb_request":{"advertise_custom":{"advertise_where":[{"advertise_on_public":{"public_ip":{"name":"example","namespace":"example"}},"port":1,"port_ranges":"example","site":{"ip":"example","network":"SITE_NETWORK_INSIDE_AND_OUTSIDE","site":{"name":"example","namespace":"example"}},"use_default_port":{},"virtual_network":{"default_v6_vip":{},"default_vip":{},"specific_v6_vip":"example","specific_vip":"example","virtual_network":{"name":"example","namespace":"example"}},"virtual_site":{"network":"SITE_NETWORK_INSIDE_AND_OUTSIDE","virtual_site":{"name":"example","namespace":"example"}},"virtual_site_with_vip":{"ip":"example","network":"SITE_NETWORK_SPECIFIED_VIP_OUTSIDE","virtual_site":{"name":"example","namespace":"example"}},"vk8s_service":{"site":{"name":"example","namespace":"example"},"virtual_site":{"name":"example","namespace":"example"}}}]},"advertise_on_public_default_vip":{},"domain":"example","listen_port":1,"name":"example","no_sni":{},"port_ranges":"example","sni":{}}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/discovery/namespaces/example/discovered_services/example/create_tcp_load_balancer \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "namespace": "example", "tcp_lb_request": { "advertise_custom": { "advertise_where": [ { "advertise_on_public": { "public_ip": { "name": "example", "namespace": "example" } }, "port": 1, "port_ranges": "example", "site": { "ip": "example", "network": "SITE_NETWORK_INSIDE_AND_OUTSIDE", "site": { "name": "example", "namespace": "example" } }, "use_default_port": {}, "virtual_network": { "default_v6_vip": {}, "default_vip": {}, "specific_v6_vip": "example", "specific_vip": "example", "virtual_network": { "name": "example", "namespace": "example" } }, "virtual_site": { "network": "SITE_NETWORK_INSIDE_AND_OUTSIDE", "virtual_site": { "name": "example", "namespace": "example" } }, "virtual_site_with_vip": { "ip": "example", "network": "SITE_NETWORK_SPECIFIED_VIP_OUTSIDE", "virtual_site": { "name": "example", "namespace": "example" } }, "vk8s_service": { "site": { "name": "example", "namespace": "example" }, "virtual_site": { "name": "example", "namespace": "example" } } } ] }, "advertise_on_public_default_vip": {}, "domain": "example", "listen_port": 1, "name": "example", "no_sni": {}, "port_ranges": "example", "sni": {} } }'Create TCP load balancer using the discovered virtual server as an origin server.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Namespace x-required Namespace of the discovered service for current request.
Service Name x-required Identifies the discovered service name.
Request Bodyrequired
Section titled “Request Bodyrequired”CreateTCPLoadBalancerRequest.
object
Identifies the discovered service name Required: YES.
Namespace of the discovered service for current request Required: YES.
object
object
Where should this load balancer be available
Required: YES.
This defines various OPTIONS where a Loadbalancer could be advertised.
object
object
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
Exclusive with [port_ranges use_default_port] Port to Listen.
Exclusive with [port use_default_port] A string containing a comma separated list of port ranges. Each port range consists of a single port or two ports separated by ”-”.
object
Use given IP address as VIP on the site.
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
object
object
object
object
Exclusive with [default_v6_vip] Use given IPv6 address as VIP on virtual Network.
Exclusive with [default_vip] Use given IPv4 address as VIP on virtual Network.
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
object
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
object
Use given IP address as VIP on the site.
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
object
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
object
Required: YES.
Exclusive with [port_ranges] Listen Port for this load balancer.
The configuration object will be created with name. It has to be unique within the namespace. The value of name has to follow DNS-1035 format. Required: YES.
object
Exclusive with [listen_port] A string containing a comma separated list of port ranges. Each port range consists of a single port or two ports separated by ”-”.
object
Responses
Section titled “Responses”A successful response.
CreateTCPLoadBalancerResponse.
object
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
Examplegenerated
{ "tcp_loadbalancer": { "name": "example", "namespace": "example" }}Returned when operation is not authorized.
Examplegenerated
exampleReturned when there is no permission to access resource.
Examplegenerated
exampleReturned when resource is not found.
Examplegenerated
exampleReturned when operation on resource is conflicting with current value.
Examplegenerated
exampleReturned when operation has been rejected as it is happening too frequently.
Examplegenerated
exampleReturned when server encountered an error in processing API.
Examplegenerated
exampleReturned when service is unavailable temporarily.
Examplegenerated
exampleReturned when server timed out processing request.
Examplegenerated
example