Select Service
ves-io-schema-virtual_host-API-Replace
Published April 5, 2023 | Last modified June 15, 2026
Examples of replacing virtual_host
Usecase:
Replace "productpage" virtual_host to now support mTLS Two changes that happens are
- Trusted CA parameter
- Flag to require client certificate is set
Request using vesctl:
vesctl configuration replace virtual_host -i virtual_host.yaml
where file virtual_host.yaml has following contents (virtual_host.ReplaceRequest):
RequestJSON:
{ "metadata": { "name": "productpage", "namespace": "documentation", "labels": { "ves.io/app_type": "bookinfo" } }, "spec": { "domains": [ "www.bookinfo.com" ], "routes": [ { "kind": "route", "name": "ppage-route" } ], "advertise_policies": [ { "kind": "advertise_policy", "name": "ppage-advertise" } ], "tls_cert_params": { "certificates": [ { "kind": "certificate", "name": "cert1" } ], "validation_params": { "trusted_ca_url": "string:///\u003cBase64\u003e" }, "cipher_suites": [], "crl": [ { "kind": "crl", "tenant": "acmecorp", "namespace": "documentation", "name": "crl-1" } ] }, "proxy": "UDP_PROXY", "no_challenge": {} }}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"],"routes":[{"kind":"route","name":"ppage-route"}],"advertise_policies":[{"kind":"advertise_policy","name":"ppage-advertise"}],"tls_cert_params":{"certificates":[{"kind":"certificate","name":"cert1"}],"validation_params":{"trusted_ca_url":"string:///\u003cBase64\u003e"},"cipher_suites":[],"crl":[{"kind":"crl","tenant":"acmecorp","namespace":"documentation","name":"crl-1"}]},"proxy":"UDP_PROXY","no_challenge":{}}}' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_q2_3kp8z3zs0x5_m7pk1bgb0_ph0000gp_T_go-build1414723615_b001_apidocs.test/host=MTY6VVHQPH/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/virtual_hosts/productpage'curl response:
HTTP/1.1 200 OKContent-Length: 4Content-Type: application/jsonDate: Mon, 13 Apr 2026 02:03:13 GMTVary: Accept-Encoding
{
}