Google

    GCE Cloud Provider 的官方 Kubernetes 文档在此处

    1. 转到 Rancher UI 中的集群视图,然后单击 省略号 >编辑

    2. 单击编辑 YAML,然后输入以下配置:

    如果您使用 Canal 或 Flannel,

    1. 转到 Rancher UI 中的集群视图,然后单击 省略号 >编辑

      1. rancher_kubernetes_engine_config:
      2. cloud_provider:
      3. name: gce
      4. customCloudProvider: |-
      5. [Global]
      6. project-id=<your project ID, optional>
      7. network-name=<your network, optional if using default network>
      8. subnetwork-name=<your subnetwork of the above network, optional if using default network>
      9. node-tags=<your network tags, must patch one or some tags, required>
      10. services:
      11. kube_controller:
      12. extra_args:
      13. configure-cloud-routes: true # we need to allow the cloud provider configure the routes for the hosts

      Copy