Reputation: 1115
We have one Kubernetes cluster running and we want to connect it to a new cluster. I found Google Clouds multicluster-service (MCS API) which seems promising, but it needs all clusters to be in the same VPC.
How do one migrate / move / add a running cluster to a VPC?
Upvotes: 2
Views: 969
Reputation: 30083
i think you can not move the cluster to another VPC, although you can create a new or clone the cluster to new VPC.
You can clone the existing one by using DUPLICATE tab in cluster details however it will just create infrastructure with the same config specs, during that time you can update Networking (VPC) as per need.
Once the duplicate(cloned) cluster is up & running in the desired VPC, you can start migrating your workloads, like deployment, secrets, stateful sets etc.
For workload migration you can checkout the tool : https://velero.io/
Velero is mostly useful for creating the backup & restore option.
it would be easy to migrate the workloads instead of going by applying the old YAML method however it's more on your setup.
Here is my small article about the migrating/cloning
workload across GCP GKE clusters: https://faun.pub/clone-migrate-data-between-kubernetes-clusters-with-velero-e298196ec3d8
Upvotes: 2