mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-27 05:28:22 +00:00
Include doc on enabling GCE cloud provider for custom clusters
This commit is contained in:
+55
@@ -0,0 +1,55 @@
|
|||||||
|
---
|
||||||
|
title: Setting up the Google Compute Engine Cloud Provider
|
||||||
|
weight: 3
|
||||||
|
---
|
||||||
|
|
||||||
|
In this section, you'll learn how to enable the Google Compute Engine (GCE) cloud provider for provisioning custom clusters in Rancher. A custom cluster is one in which Rancher installs Kubernetes on existing nodes.
|
||||||
|
|
||||||
|
These steps are required for provisioning GCE Kubernetes clusters that include Windows nodes.
|
||||||
|
|
||||||
|
The official Kubernetes documentation for the GCE cloud provider is [here.](https://kubernetes.io/docs/concepts/cluster-administration/cloud-providers/#gce)
|
||||||
|
|
||||||
|
> **Prerequisites:** The service account of `Identity and API` access on GCE needs the `Computer Admin` permission.
|
||||||
|
|
||||||
|
If you are using Calico,
|
||||||
|
|
||||||
|
1. Go to the cluster view in the Rancher UI, and click **⋮ > Edit.**
|
||||||
|
1. Click **Edit as YAML,** and enter the following configuration:
|
||||||
|
```yaml
|
||||||
|
rancher_kubernetes_engine_config:
|
||||||
|
cloud_provider:
|
||||||
|
name: gce
|
||||||
|
customCloudProvider: |-
|
||||||
|
[Global]
|
||||||
|
project-id=<your projcet 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-instance-prefix=<your instance group name/your instance name specific prefix, required>
|
||||||
|
node-tags=<your network tags, must patch one or some tags, required>
|
||||||
|
network:
|
||||||
|
options:
|
||||||
|
calico_cloud_provider: "gce"
|
||||||
|
plugin: "calico"
|
||||||
|
```
|
||||||
|
|
||||||
|
If you are using Canal or Flannel,
|
||||||
|
|
||||||
|
1. Go to the cluster view in the Rancher UI, and click **⋮ > Edit.**
|
||||||
|
1. Click **Edit as YAML,** and enter the following configuration:
|
||||||
|
```yaml
|
||||||
|
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-instance-prefix=<your instance group name/your instance name specific prefix, required>
|
||||||
|
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 to configure the routes for the hosts
|
||||||
|
```
|
||||||
+1
-1
@@ -94,7 +94,7 @@ If you set a Kubernetes cloud provider in your cluster, some additional steps ar
|
|||||||
|
|
||||||
If you are using the GCE (Google Compute Engine) cloud provider, you must do the following:
|
If you are using the GCE (Google Compute Engine) cloud provider, you must do the following:
|
||||||
|
|
||||||
- Specify `gce` as the cloud provider in the `cluster.yml`
|
- Enable the GCE cloud provider in the `cluster.yml` by following [these steps.]({{<baseurl>}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/cloud-providers/gce)
|
||||||
- When provisioning the cluster in Rancher, choose **Custom cloud provider** as the cloud provider in the Rancher UI.
|
- When provisioning the cluster in Rancher, choose **Custom cloud provider** as the cloud provider in the Rancher UI.
|
||||||
|
|
||||||
# Tutorial: How to Create a Cluster with Windows Support
|
# Tutorial: How to Create a Cluster with Windows Support
|
||||||
|
|||||||
Reference in New Issue
Block a user