问题
Few queries on GKE
- We have few
GKECLusters running onDefault VPC. Can we migrate these clusters to useSharedVPCor atleastCustom VPC? It seems existing clusters with default VPC mode cannot be changed toSharedVPC modelas per GCP documentation but can we convert toCustom VPCfromdefault VPC - How to migrate from
Custom VPCtoShared VPC? Is it creating a new Cluster from existing Cluster and selectSharedVPCin networking section for new cluster and then copy the Kubernetes resources to new Cluster? - Also looks like we cannot convert
publicGKE Cluster toprivatemode. Does this too requires creation of new Cluster to migrate fromPublictoPrivateGKE Cluster?
回答1:
Unfortunatelly you cannot change any of those settings on the existing GKE cluster. You can clone the existing one by using DUPLICATE tab in cluster details:
During new cluster creation you can change it from Public to Private in Cluster -> Networking section:
After choosing it you'll need to correct fields that are marked in red:
You can also choose different VPC network.
When it comes to migrating a workload this is separate story. You can choose the approach which is most suitable for you, ranging from manually exporting all your yaml manifests (pretty tedious and not very convenient process I would say) to using dedicated tools like velero.
来源:https://stackoverflow.com/questions/64277797/migration-of-gke-from-default-to-shared-vpc-and-public-to-private-gke-cluster