diff --git a/content/rancher/v2.5/en/cluster-provisioning/hosted-kubernetes-clusters/gke/_index.md b/content/rancher/v2.5/en/cluster-provisioning/hosted-kubernetes-clusters/gke/_index.md index 04e27648067..a58fbd6b74f 100644 --- a/content/rancher/v2.5/en/cluster-provisioning/hosted-kubernetes-clusters/gke/_index.md +++ b/content/rancher/v2.5/en/cluster-provisioning/hosted-kubernetes-clusters/gke/_index.md @@ -6,7 +6,68 @@ aliases: - /rancher/v2.5/en/tasks/clusters/creating-a-cluster/create-cluster-gke/ --- -## Prerequisites in Google Kubernetes Engine +{{% tabs %}} +{{% tab "Rancher v2.5.8+" %}} + +# Prerequisites in Google Kubernetes Engine + +>**Note** +>Deploying to GKE will incur charges. + +### Service Account + +Create a service account using [Google Kubernetes Engine](https://console.cloud.google.com/projectselector/iam-admin/serviceaccounts). GKE uses this account to operate your cluster. Creating this account also generates a private key used for authentication. + +The service account requires the following roles: + +- **Compute Viewer:** `roles/compute.viewer` +- **Project Viewer:** `roles/viewer` +- **Kubernetes Engine Admin:** `roles/container.admin` +- **Service Account User:** `roles/iam.serviceAccountUser` + +[Google Documentation: Creating and Enabling Service Accounts](https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances) + +For help obtaining a private key for your service account, refer to the Google cloud documentation [here.](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating_service_account_keys) You will need to save the key in JSON format. + +### Google Project ID + +Your cluster will need to be part of a Google Project. + +To create a new project, refer to the Google cloud documentation [here.](https://cloud.google.com/resource-manager/docs/creating-managing-projects#creating_a_project) + +To get the project ID of an existing project, refer to the Google cloud documentation [here.](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + + +# 1. Create a Cloud Credential + +1. In the upper right corner, click the user profile dropdown menu and click **Cloud Credentials.** +1. Click **Add Cloud Credential.** +1. Enter a name for your Google cloud credentials. +1. In the **Cloud Credential Type** field, select **Google.** +1. In the **Service Account** text box, paste your service account private key JSON, or upload the JSON file. +1. Click **Create.** + +**Result:** You have created credentials that Rancher will use to provision the new GKE cluster. + +# 2. Create the GKE Cluster + + + +Use Rancher to set up and configure your Kubernetes cluster. + +1. From the **Clusters** page, click **Add Cluster**. +1. Under **With a hosted Kubernetes provider,** click **Google GKE**. +1. Enter a **Cluster Name**. +1. Optional: Use **Member Roles** to configure user authorization for the cluster. Click **Add Member** to add users that can access the cluster. Use the **Role** drop-down to set permissions for each user. +1. Optional: Add Kubernetes [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) or [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) to the cluster. +1. Enter your Google project ID and your Google cloud credentials. +1. Enter a cluster location. + + +{{% /tab %}} +{{% tab "Rancher before v2.5.8" %}} + +# Prerequisites in Google Kubernetes Engine >**Note** >Deploying to GKE will incur charges. @@ -22,7 +83,7 @@ The service account requires the following roles: [Google Documentation: Creating and Enabling Service Accounts](https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances) -## Create the GKE Cluster +# Create the GKE Cluster Use Rancher to set up and configure your Kubernetes cluster. @@ -38,10 +99,7 @@ Use Rancher to set up and configure your Kubernetes cluster. >**Note:** After submitting your private key, you may have to enable the Google Kubernetes Engine API. If prompted, browse to the URL displayed in the Rancher UI to enable the API. -6. Select your **Cluster Options** -7. Customize your **Node Options** - * Enabling the Auto Upgrade feature for Nodes is not recommended. -8. Select your **Security Options** +6. Select your cluster options, node options and security options. For help, refer to the [GKE Cluster Configuration Reference.](#gke-before-v2-5-8) 9. Review your options to confirm they're correct. Then click **Create**. **Result:** @@ -54,3 +112,145 @@ You can access your cluster after its state is updated to **Active.** - `Default`, containing the `default` namespace - `System`, containing the `cattle-system`, `ingress-nginx`, `kube-public`, and `kube-system` namespaces + + + +# GKE Cluster Configuration Reference + + + + + +## Labels & Annotations + +Same docs as for any other cluster - can link to upstream kubernetes docs on labels and annotations + +## Kubernetes Options + +### Location Type +Zonal or Regional - link to GKE docs +can't be edited after cluster creation + +### Zone +Link to list of GKE zones + +### Additional Zones +Link to list of GKE additional zones + +### Kubernetes Version +Link to list of GKE kubernetes versions + +### Container Address Range +link + +### Alpha Features +link (enabled/disabled) + +### Legacy Authorization +link (enabled/disabled) + +### Stackdriver Logging +link (enabled/disabled) + +### Stackdriver Monitoring +link (enabled/disabled) + +### Kubernetes Dashboard +link (enabled/disabled) + +### Http Load Balancing +link (enabled/disabled) + +### Horizontal Pod Autoscaling +link (enabled/disabled) + +### Maintenance Window +link (time of day) + +### Network +link (default) + +### Node Subnet +link (Auto Create Subnetwork or default) + +### Ip Aliases +link (enabled/disabled) + +### Cluster Secondary Range Name +(Available after cluster is created) + +### Services Secondary Range Name +(available after cluster is created +) +### Pod address range +link + +### Service address range +link + +### Cluster labels +link + +## Advanced Cluster Options + +### Private Cluster +link (enabled/disabled) + +### Master Authorized Network +link (enabled/disabled) + + +## Node Options + +### Node Count +integer + +### Machine Type +list of machine types + +### Image Types +Ubuntu or Container-Optimized OS + +### Root disk type +Standard persistent disk or SSD persistent disk + +### Root Disk Size +integer in GB - link to root disk doc + +### Local SSD disks +integer in GB + +### Preemptible nodes (beta) +link (enabled/disabled) + +### Auto Upgrade +link (enabled/disabled) + +Note: Enabling the Auto Upgrade feature for Nodes is not recommended. + +### Auto Repair +link (enabled/disabled) + +## Node Pool Autoscaling + +### Node Pool Autoscaling +link (enabled/disabled) + +### Taints +link + +### Node Labels +link + +## Security Options + +### Service Account +link - service account private key JSON file. + +Create a [Service Account](https://console.cloud.google.com/projectselector/iam-admin/serviceaccounts) with a JSON private key and provide the JSON here. See [Google Cloud docs](https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances) for more info about creating a service account. These IAM roles are required: Compute Viewer (`roles/compute.viewer`), (Project) Viewer (`roles/viewer`), Kubernetes Engine Admin (`roles/container.admin`), Service Account User (`roles/iam.serviceAccountUser`). More info on roles can be found [here.](https://cloud.google.com/kubernetes-engine/docs/how-to/iam-integration) + +### Access Scopes +link + +{{% /tab %}} +{{% /tabs %}} diff --git a/content/rancher/v2.5/en/cluster-provisioning/hosted-kubernetes-clusters/gke/config-reference/_index.md b/content/rancher/v2.5/en/cluster-provisioning/hosted-kubernetes-clusters/gke/config-reference/_index.md new file mode 100644 index 00000000000..7525e7e194a --- /dev/null +++ b/content/rancher/v2.5/en/cluster-provisioning/hosted-kubernetes-clusters/gke/config-reference/_index.md @@ -0,0 +1,141 @@ +--- +title: GKE Cluster Configuration Reference +weight: 1 +--- + +{{% tabs %}} +{{% tab "v2.5.8" %}} + +# Cluster Location + +| Value | Description | +|--------|--------------| +| Location Type | Zonal or Regional. With GKE, you can create a cluster tailored to the availability requirements of your workload and your budget. By default, a cluster's nodes run in a single compute zone. When multiple zones are selected, the cluster's nodes will span multiple compute zones, while the controlplane is located in a single zone. Regional clusters increase the availability of the controlplane as well. For help choosing the type of cluster availability, refer to [these docs.](https://cloud.google.com/kubernetes-engine/docs/best-practices/scalability#choosing_a_regional_or_zonal_control_plane) | +| Zone | Each region in Compute engine contains a number of zones. For more information about available regions and zones, refer to [these docs.](https://cloud.google.com/compute/docs/regions-zones#available) | +| Additional Zones | For zonal clusters, you can select additional zones to create a [multi-zone cluster.](https://cloud.google.com/kubernetes-engine/docs/concepts/types-of-clusters#multi-zonal_clusters) | +| Region | For [regional clusters,](https://cloud.google.com/kubernetes-engine/docs/concepts/types-of-clusters#regional_clusters) you can select a region. For more information about available regions and zones, refer to [this section](https://cloud.google.com/compute/docs/regions-zones#available). The first part of each zone name is the name of the region. | + +# Cluster Options + +### Kubernetes Version +- list of GKE Kubernetes versions + +### Container Address Range + +### Network + +### Node Subnet + +### Ip Aliases + +### Network Policy + +### Subnetwork Name (required) + +### Cluster Pod Address Range + +### Node Ipv4 CIDR Block + +### Service Address Range + + + + +# Additional Options + +### Cluster Addons + +- Horizontal Pod Autoscaling +- HTTP (L7) Load Balancing +- Network Policy Config (master only + +### Cluster Features +- Alpha Features + +### Logging Service +- options + +### Monitoring Service +- options + +### Maintenance Window +- time of day + + + +# Node Pools + +In this section, enter details describing the configuration of each node in the node pool. +### Kubernetes Version + +The Kubernetes version for each node in the node pool. For more information on GKE Kubernetes versions, refer to [these docs.](https://cloud.google.com/kubernetes-engine/versioning) + +### Image Type + +For more information for the node image options that GKE offers for each OS, refer to [this page.](https://cloud.google.com/kubernetes-engine/docs/concepts/node-images#available_node_images) + +### Machine Type + +For more information on Google Cloud machine types, refer to [this page.](https://cloud.google.com/compute/docs/machine-types#machine_types) + +### Root Disk Type + +Standard persistent disks are backed by standard hard disk drives (HDD), while SSD persistent disks are backed by solid state drives (SSD). For more information, refer to [this section.](https://cloud.google.com/compute/docs/disks) + +### Local SSD Disks + +Configure each node's local SSD disk storage in GB. Local SSDs are physically attached to the server that hosts your VM instance. Local SSDs have higher throughput and lower latency than standard persistent disks or SSD persistent disks. The data that you store on a local SSD persists only until the instance is stopped or deleted. For more information, see [this section.](https://cloud.google.com/compute/docs/disks#localssds) + +### Preemptible nodes (beta) + +Preemptible nodes, also called preemptible VMs, are Compute Engine VM instances that last a maximum of 24 hours in general, and provide no availability guarantees. For more information, see [this page.](https://cloud.google.com/kubernetes-engine/docs/how-to/preemptible-vms) + +### Taints + +When you apply a taint to a node, only Pods that tolerate the taint are allowed to run on the node. In a GKE cluster, you can apply a taint to a node pool, which applies the taint to all nodes in the pool. + +### Node Labels + +You can apply labels to the node pool, which applies the labels to all nodes in the pool. + + +# Group Details + +In this section, enter details describing the node pool. + +### Name +Enter a name for the node group. + +### Initial Node Count +Integer for the starting number of nodes in the node pool. + +### Max Pod Per Node + +GKE has a hard limit of 110 Pods per node. For more information on the Kubernetes limits, see [this section.](https://cloud.google.com/kubernetes-engine/docs/best-practices/scalability#dimension_limits) + +### Horizontal Pod Autoscaling + +The Horizontal Pod Autoscaler changes the shape of your Kubernetes workload by automatically increasing or decreasing the number of Pods in response to the workload's CPU or memory consumption, or in response to custom metrics reported from within Kubernetes or external metrics from sources outside of your cluster. For more information, see [this page.](https://cloud.google.com/kubernetes-engine/docs/concepts/horizontalpodautoscaler) + +### Auto Repair + +GKE's node auto-repair feature helps you keep the nodes in your cluster in a healthy, running state. When enabled, GKE makes periodic checks on the health state of each node in your cluster. If a node fails consecutive health checks over an extended time period, GKE initiates a repair process for that node. For more information, see the section on [auto-repairing nodes.](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair) + +### Auto Upgrade + +When enabled, the auto-upgrade feature keeps the nodes in your cluster up-to-date with the cluster control plane (master) version when your control plane is [updated on your behalf.(https://cloud.google.com/kubernetes-engine/upgrades#automatic_cp_upgrades) For more information about auto-upgrading nodes, see [this page.](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-upgrades) + +### Access Scopes + +Access scopes are the legacy method of specifying permissions for your nodes. + +- **Allow default access:** The default access for new clusters is the [Compute Engine default service account.](https://cloud.google.com/compute/docs/access/service-accounts?hl=en_US#default_service_account) +- **Allow full access to all Cloud APIs:** Generally, you can just set the cloud-platform access scope to allow full access to all Cloud APIs, then grant the service account only relevant IAM roles. The combination of access scopes granted to the virtual machine instance and the IAM roles granted to the service account determines the amount of access the service account has for that instance. +- **Set access for each API:** Alternatively, you can choose to set specific scopes that permit access to the particular API methods that the service will call. + +For more information, see the [section about enabling service accounts for a VM.](https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances) + +{{% /tab %}} +{{% tab "Rancher before v2.5.8" %}} +{{% /tab %}} +{{% /tabs %}}