ves-io-schema-views-tcp_loadbalancer-API-Replace
On This Page:
Examples of replacing tcp_loadbalancer
Usecase:
Replace "productpage" tcp_loadbalancer to now support SNI
Request using vesctl:
vesctl configuration replace tcp_loadbalancer -i tcp_loadbalancer.yaml
where file tcp_loadbalancer.yaml has following contents (tcp_loadbalancer.ReplaceRequest):
metadata:
labels:
ves.io/app_type: bookinfo
name: productpage
namespace: documentation
spec:
advertiseOnPublicDefaultVip: {}
domains:
- www.bookinfo.com
hashPolicyChoiceRoundRobin: {}
listenPort: 80
originPoolsWeights:
- pool:
name: ppage-route
retractCluster: {}
withSni: true
vesctl yaml response: None
Request using curl:
curl -X 'PUT' -d '{"metadata":{"name":"productpage","namespace":"documentation","labels":{"ves.io/app_type":"bookinfo"}},"spec":{"domains":["www.bookinfo.com"],"listen_port":80,"with_sni":true,"origin_pools_weights":[{"pool":{"name":"ppage-route"}}],"advertise_on_public_default_vip":{},"hash_policy_choice_round_robin":{},"retract_cluster":{}}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build949174848_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/tcp_loadbalancers/productpage'
curl response:
HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Mon, 09 May 2022 09:48:40 GMT
Vary: Accept-Encoding
{
}