Move VCluster To Other Project
This API can be used to move a virtual cluster from one project to another.
Example Move Virtual Cluster To Other Project
An example Move Virtual Cluster To Other Project:
apiVersion: management.loft.sh/v1
kind: ProjectMigrateVirtualClusterInstance
metadata:
creationTimestamp: null
sourceVirtualClusterInstance:
name: my-virtual-cluster
namespace: loft-p-my-other-project
Move Virtual Cluster To Other Project Reference
kind
required string
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
kind
required string apiVersion
required string
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
apiVersion
required string metadata
required object
metadata
required object sourceVirtualClusterInstance
required object
SourceVirtualClusterInstance is the virtual cluster instance to migrate into this project
sourceVirtualClusterInstance
required object Move Virtual Cluster To Other Project (Create)
Move a virtual cluster into another project using this API.
- curl
Create a file object.yaml
with the following contents:
apiVersion: management.loft.sh/v1
kind: ProjectMigrateVirtualClusterInstance
metadata:
creationTimestamp: null
sourceVirtualClusterInstance:
name: my-virtual-cluster
namespace: loft-p-my-other-project
Then run the following curl command:
# Exchange my-object in the url below with the name of the Move Virtual Cluster To Other Project
curl -s -X POST --insecure \
"https://$LOFT_DOMAIN/kubernetes/management/apis/management.loft.sh/v1/projects/my-object/migratevirtualclusterinstance" \
--data-binary "$(cat object.yaml)" \
-H "Content-Type: application/yaml" \
-H "Authorization: Bearer $ACCESS_KEY"