问题
Few queries on GKE
- We have few
GKE
CLusters running onDefault VPC
. Can we migrate these clusters to useSharedVPC
or atleastCustom VPC
? It seems existing clusters with default VPC mode cannot be changed toSharedVPC model
as per GCP documentation but can we convert toCustom VPC
fromdefault VPC
- How to migrate from
Custom VPC
toShared VPC
? Is it creating a new Cluster from existing Cluster and selectSharedVPC
in networking section for new cluster and then copy the Kubernetes resources to new Cluster? - Also looks like we cannot convert
public
GKE Cluster toprivate
mode. Does this too requires creation of new Cluster to migrate fromPublic
toPrivate
GKE 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