From d59f3d6486726d2c161764dee99156565b162823 Mon Sep 17 00:00:00 2001 From: Catherine Luse Date: Tue, 20 Apr 2021 11:43:37 -0700 Subject: [PATCH] Update GKE provisioning docs for v2.5.8 --- .../hosted-kubernetes-clusters/gke/_index.md | 177 +++--------------- .../gke/config-reference/_index.md | 177 +++++++++++++++++- 2 files changed, 194 insertions(+), 160 deletions(-) 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 a58fbd6b74f..69279b0c850 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 @@ -9,12 +9,11 @@ aliases: {{% tabs %}} {{% tab "Rancher v2.5.8+" %}} -# Prerequisites in Google Kubernetes Engine +# Prerequisites ->**Note** ->Deploying to GKE will incur charges. +Some setup in Google Kubernetes Engine is required. -### Service Account +### Service Account Token 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. @@ -37,6 +36,8 @@ To create a new project, refer to the Google cloud documentation [here.](https:/ 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) +>**Note** +>Deploying to GKE will incur charges. # 1. Create a Cloud Credential @@ -50,9 +51,6 @@ To get the project ID of an existing project, refer to the Google cloud document **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**. @@ -61,16 +59,28 @@ Use Rancher to set up and configure your Kubernetes cluster. 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. +1. Fill out the rest of the form. For help, refer to the [GKE cluster configuration reference.](./config-reference) +1. Click **Create.** +**Result:** You have successfully deployed a GKE cluster. + +Your cluster is created and assigned a state of **Provisioning.** Rancher is standing up your cluster. + +You can access your cluster after its state is updated to **Active.** + +**Active** clusters are assigned two Projects: + +- `Default`, containing the `default` namespace +- `System`, containing the `cattle-system`, `ingress-nginx`, `kube-public`, and `kube-system` namespaces {{% /tab %}} {{% tab "Rancher before v2.5.8" %}} -# Prerequisites in Google Kubernetes Engine +# Prerequisites ->**Note** ->Deploying to GKE will incur charges. +Some setup in Google Kubernetes Engine is required. + +### Service Account Token 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. @@ -83,6 +93,10 @@ 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) + +>**Note** +>Deploying to GKE will incur charges. + # Create the GKE Cluster Use Rancher to set up and configure your Kubernetes cluster. @@ -102,7 +116,7 @@ Use Rancher to set up and configure your Kubernetes cluster. 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:** +**Result:** You have successfully deployed a GKE cluster. Your cluster is created and assigned a state of **Provisioning.** Rancher is standing up your cluster. @@ -113,144 +127,5 @@ 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 index 7525e7e194a..e6ba73ed109 100644 --- 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 @@ -6,6 +6,23 @@ weight: 1 {{% tabs %}} {{% tab "v2.5.8" %}} +### Changes in v2.5.8 + +- We now support private GKE clusters. +- Shared VPCs are now supported. You can use an organization level VPC as well as a project level VPC. +- We now support more configuration options for Rancher managed GKE clusters: + - Project ID + - Service address range + - Node Ipv4 CIDR block + - Cluster pod address range + - Subnetwork name + - Network policy + - Network policy config + - Node groups and node configuration options: + - More image types are available for the nodes + - The max pods per node can be configured +- When provisioning a GKE cluster, you can now use reusable cloud credentials instead of using a service account token directly to create the cluster. + # Cluster Location | Value | Description | @@ -18,7 +35,7 @@ weight: 1 # Cluster Options ### Kubernetes Version -- list of GKE Kubernetes versions +For more information on GKE Kubernetes versions, refer to [these docs.](https://cloud.google.com/kubernetes-engine/versioning) ### Container Address Range @@ -39,8 +56,6 @@ weight: 1 ### Service Address Range - - # Additional Options ### Cluster Addons @@ -49,17 +64,15 @@ weight: 1 - HTTP (L7) Load Balancing - Network Policy Config (master only -### Cluster Features -- Alpha Features +### Cluster Features (Alpha Features) ### Logging Service -- options + ### Monitoring Service -- options + ### Maintenance Window -- time of day @@ -123,7 +136,7 @@ GKE's node auto-repair feature helps you keep the nodes in your cluster in a hea ### 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) +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 @@ -137,5 +150,151 @@ For more information, see the [section about enabling service accounts for a VM. {{% /tab %}} {{% tab "Rancher before v2.5.8" %}} + + +# Labels & Annotations + +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. + +# Kubernetes Options + +### 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) + +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. + +The location type can't be changed after the cluster is created. + +### 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) + +### Kubernetes Version +Link to list of GKE kubernetes versions + +### Container Address Range + +### Alpha Features + + +### Legacy Authorization + + +### Stackdriver Logging + + +### Stackdriver Monitoring + + +### Kubernetes Dashboard + + +### Http Load Balancing + + +### Horizontal Pod Autoscaling + + +### Maintenance Window + + +### Network + + +### Node Subnet + + +### Ip Aliases + + +### Cluster Secondary Range Name +This option is available after the cluster is created. + +### Services Secondary Range Name +This option is available after the cluster is created. +### Pod address range + + +### Service address range + + +### Cluster Labels + +A [cluster label](https://cloud.google.com/kubernetes-engine/docs/how-to/creating-managing-labels) is a key-value pair that helps you organize your Google Cloud clusters. You can attach a label to each resource, then filter the resources based on their labels. Information about labels is forwarded to the billing system, so you can break down your billing charges by label. +## Advanced Cluster Options + +### Private Cluster + + +### Master Authorized Network + + + +## Node Options + +### Node Count +Integer for the starting number of nodes in the node pool. + +### Machine Type +For more information on Google Cloud machine types, refer to [this page.](https://cloud.google.com/compute/docs/machine-types#machine_types) + +### Image Types +Ubuntu or Container-Optimized OS images are available. + +For more information about GKE node image options, refer to [this page.](https://cloud.google.com/kubernetes-engine/docs/concepts/node-images#available_node_images) + +### 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) + +### Root Disk Size +The size in GB of the [root disk.](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) + +### Auto Upgrade + +> Note: Enabling the Auto Upgrade feature for Nodes is not recommended. + +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) + +### 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) + +### Node Pool Autoscaling + +Enable node pool autoscaling based on cluster load. For more information, see the documentation on [adding a node pool with autoscaling.](https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-autoscaler#adding_a_node_pool_with_autoscaling) + +### 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. + +## Security Options + +### Service Account + + +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 + +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 %}} {{% /tabs %}}