ves-io-schema-k8s_cluster-API-Replace
On This Page:
Examples of replacing k8s_cluster
Usecase:
Replace k8s cluster for a site to enable global access
Request using vesctl:
vesctl configuration replace k8s_cluster -i k8s_cluster.yaml
where file k8scluster.yaml has following contents (k8scluster.ReplaceRequest):
metadata:
name: k8s-cluster-1
namespace: system
spec:
globalAccessEnable: {}
localAccessConfig:
defaultPort: {}
localDomain: example.com
noInsecureRegistries: {}
useDefaultClusterRoleBindings: {}
useDefaultClusterRoles: {}
useDefaultPsp: {}
vesctl yaml response: None
Request using curl:
curl -X 'PUT' -d '{"metadata":{"name":"k8s-cluster-1","namespace":"system"},"spec":{"localAccessConfig":{"localDomain":"example.com","defaultPort":{}},"globalAccessEnable":{},"useDefaultPsp":{},"useDefaultClusterRoles":{},"useDefaultClusterRoleBindings":{},"noInsecureRegistries":{}}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build817539475_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/k8s_clusters/k8s-cluster-1'
curl response:
HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Mon, 22 Feb 2021 15:44:03 GMT
Vary: Accept-Encoding
{
}