​
Select Service
ves-io-schema-k8s_cluster_role_binding-API-Replace
Published April 5, 2023 | Last modified May 28, 2026
Examples of replacing k8s_cluster_role_binding
Usecase:
Replace role-binding-1 to modify subject list to add user2
Request using vesctl:
vesctl configuration replace k8s_cluster_role_binding -i k8s_cluster_role_binding.yaml
where file k8s_cluster_role_binding.yaml has following contents (k8s_cluster_role_binding.ReplaceRequest):
RequestJSON:
{ "metadata": { "name": "role-binding-1", "namespace": "system" }, "spec": { "k8s_cluster_role": { "namespace": "system", "name": "k8s-cluster-role-1" }, "subjects": [ { "user": "user1@example.com" }, { "user": "user2@example.com" } ] }}vesctl yaml response: None
Request using curl:
curl -X 'PUT' -d '{"metadata":{"name":"role-binding-1","namespace":"system"},"spec":{"k8s_cluster_role":{"namespace":"system","name":"k8s-cluster-role-1"},"subjects":[{"user":"user1@example.com"},{"user":"user2@example.com"}]}}' -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/system/k8s_cluster_role_bindings/role-binding-1'curl response:
HTTP/1.1 200 OKContent-Length: 4Content-Type: application/jsonDate: Mon, 13 Apr 2026 01:59:43 GMTVary: Accept-Encoding
{
}