GKE从默认迁移到共享VPC,从公共迁移到私有GKE集群 [英] Migration of GKE from Default to Shared VPC and Public to Private GKE CLuster
问题描述
关于GKE的查询很少
- 我们在
Default VPC
上运行的GKE
个集群很少.我们可以迁移这些集群以使用SharedVPC
或至少Custom VPC
吗?根据GCP文档,似乎默认VPC模式下的现有群集无法更改为SharedVPC model
,但是我们可以从default VPC
转换为 - 如何从
Custom VPC
迁移到Shared VPC
?是否会从现有集群创建一个新集群,并在网络部分中为新集群选择SharedVPC
,然后将Kubernetes资源复制到新集群? - 看起来我们也无法将
public
GKE群集转换为private
模式.这是否还需要创建新的集群才能从Public
迁移到Private
GKE集群?
Custom VPC
- 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?
推荐答案
不幸的是,您无法在现有 GKE 群集上更改任何这些设置.您可以使用群集详细信息中的DUPLICATE
选项卡克隆现有的计算机:
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:
在创建新集群期间,可以在Cluster -> Networking
部分中将其从Public
更改为Private
:
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:
您还可以选择其他VPC
网络.
You can also choose different VPC
network.
在迁移工作负载时,这是另外一回事了.您可以选择最适合您的方法,从手动导出所有yaml清单(我会说非常繁琐且不太方便的过程)到使用
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.
这篇关于GKE从默认迁移到共享VPC,从公共迁移到私有GKE集群的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!