ves-io-schema-cluster-API-Replace
On This Page:
Examples of replacing cluster
Usecase:
Replace productpage-cluster to modify loadbalancing algorithm to round robin
Request using vesctl:
vesctl configuration replace cluster -i cluster.yaml
where file cluster.yaml has following contents (cluster.ReplaceRequest):
metadata:
name: productpage-cluster
namespace: documentation
spec:
endpoints:
- kind: endpoint
name: productpage-endpoint
namespace: documentation
tenant: acmecorp
healthChecks:
- kind: healthcheck
name: productpage-healthcheck
namespace: documentation
tenant: acmecorp
tlsParameters:
commonParams:
cipherSuites: []
tlsCertificates:
- certificateUrl: string:///<Base64>
privateKey:
blindfoldSecretInfo:
location: string:///<Base64>
sni: productpage.internal.bookinfo.com
vesctl yaml response: None
Request using curl:
curl -X 'PUT' -d '{"metadata":{"name":"productpage-cluster","namespace":"documentation"},"spec":{"endpoints":[{"kind":"endpoint","tenant":"acmecorp","namespace":"documentation","name":"productpage-endpoint"}],"healthChecks":[{"kind":"healthcheck","tenant":"acmecorp","namespace":"documentation","name":"productpage-healthcheck"}],"tlsParameters":{"commonParams":{"cipherSuites":[],"tlsCertificates":[{"certificateUrl":"string:///\u003cBase64\u003e","privateKey":{"blindfoldSecretInfo":{"location":"string:///\u003cBase64\u003e"}}}]},"sni":"productpage.internal.bookinfo.com"}}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build318584715_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/clusters/productpage-cluster'
curl response:
HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Wed, 31 Mar 2021 08:28:18 GMT
Vary: Accept-Encoding
{
}