GCE Cloud Provider 的官方 Kubernetes 文档在此处。
转到 Rancher UI 中的集群视图,然后单击 省略号 >编辑。
单击编辑 YAML,然后输入以下配置:
如果您使用 Canal 或 Flannel,
转到 Rancher UI 中的集群视图,然后单击 省略号 >编辑。
-
rancher_kubernetes_engine_config:
cloud_provider:
name: gce
customCloudProvider: |-
[Global]
project-id=<your project ID, optional>
network-name=<your network, optional if using default network>
subnetwork-name=<your subnetwork of the above network, optional if using default network>
node-tags=<your network tags, must patch one or some tags, required>
services:
kube_controller:
extra_args:
configure-cloud-routes: true # we need to allow the cloud provider configure the routes for the hosts
Copy