【问题标题】:What is the purpose of gcloud config set container/cluster cluster_name?gcloud config set container/cluster cluster_name 的目的是什么?
【发布时间】:2018-08-28 14:17:35
【问题描述】:

我有两个 GKE 集群:c1、c2、

我使用gcloud config set container/cluster c1将默认集群设置为c1,之后我运行kubectl run,似乎新的pod仍然在c2中创建。

如何切换到 c2? gcloud config set container/cluster cluster_name的目的是什么?

【问题讨论】:

    标签: kubernetes google-cloud-platform kubectl google-kubernetes-engine


    【解决方案1】:

    gcloud container cluster 命令用于从 GCP 角度管理集群,例如使用 node-pools create command 为 GKE kubernetes 集群添加另一个节点池。

    控制用于 kubectl 的集群是通过 .kube/config 文件完成的,该文件具有所谓的current-contextkubectx/kubens project 提供了一些很好的帮助,可以更轻松地在集群(和命名空间)之间切换。

    【讨论】:

      猜你喜欢
      • 2021-12-27
      • 2016-06-30
      • 2020-03-26
      • 1970-01-01
      • 1970-01-01
      • 2021-05-17
      • 1970-01-01
      • 1970-01-01
      • 2022-01-16
      相关资源
      最近更新 更多