将另一个 Kubernetes 集群添加到 Gitlab

Adding another Kubernetes cluster to Gitlab

我已经在 Gitlab 的项目中添加了一个 Kubernetes 集群。该集群托管在 AWS 上。此配置工作正常,我能够部署我的应用程序。我想将另一个 Kubernetes 集群添加到同一项目中,该集群也托管在 AWS 上但位于不同的区域。到目前为止,我无法找到将另一个集群添加到同一项目的方法。 Gitlab 没有给我添加另一个集群的选项。可能吗?如果可能的话,我应该怎么做?

是的,这是可能的,但仅限于 Gitlab 企业版。 Support for multiple Kubernetes clusters was introduced in Gitlab Premium/Ultimate 10.3。

With GitLab Premium, you can associate more than one Kubernetes clusters to your project. That way you can have different clusters for different environments, like dev, staging, production, etc.

Simply add another cluster, like you did the first time, and make sure to set an environment scope that will differentiate the new cluster with the rest.