const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
apiVersion: 'k0rdent.mirantis.com/v1beta1',
kind: 'ClusterDeployment',
metadata: {name: 'my-cluster', namespace: 'kcm-system'},
spec: {}
})
};
fetch('http://localhost:4065/v1/kubernetes/cluster-deployments/{namespace}/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));