Skip to content

Commit 2226284

Browse files
authored
Merge pull request #834 from richardchen331/gke_pr_8
Add docs (GKE part 8)
2 parents da5be4a + 92130bd commit 2226284

File tree

5 files changed

+74
-0
lines changed

5 files changed

+74
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# GKE Cluster Upgrades
2+
3+
## Control Plane Upgrade
4+
5+
Upgrading the Kubernetes version of the control plane is supported by the provider. To perform an upgrade you need to update the `controlPlaneVersion` in the spec of the `GCPManagedControlPlane`. Once the version has changed the provider will handle the upgrade for you.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Creating a GKE cluster
2+
3+
New "gke" cluster templates have been created that you can use with `clusterctl` to create a GKE cluster.
4+
5+
To create a GKE cluster with a managed node group (a.k.a managed machine pool):
6+
7+
```bash
8+
clusterctl generate cluster capi-gke-quickstart --flavor gke --worker-machine-count=3 > capi-gke-quickstart.yaml
9+
```
10+
11+
## Kubeconfig
12+
13+
When creating an GKE cluster 2 kubeconfigs are generated and stored as secrets in the management cluster.
14+
15+
### User kubeconfig
16+
17+
This should be used by users that want to connect to the newly created GKE cluster. The name of the secret that contains the kubeconfig will be `[cluster-name]-user-kubeconfig` where you need to replace **[cluster-name]** with the name of your cluster. The **-user-kubeconfig** in the name indicates that the kubeconfig is for the user use.
18+
19+
To get the user kubeconfig for a cluster named `managed-test` you can run a command similar to:
20+
21+
```bash
22+
kubectl --namespace=default get secret managed-test-user-kubeconfig \
23+
-o jsonpath={.data.value} | base64 --decode \
24+
> managed-test.kubeconfig
25+
```
26+
27+
### Cluster API (CAPI) kubeconfig
28+
29+
This kubeconfig is used internally by CAPI and shouldn't be used outside of the management server. It is used by CAPI to perform operations, such as draining a node. The name of the secret that contains the kubeconfig will be `[cluster-name]-kubeconfig` where you need to replace **[cluster-name]** with the name of your cluster. Note that there is NO `-user` in the name.
30+
31+
The kubeconfig is regenerated every `sync-period` as the token that is embedded in the kubeconfig is only valid for a short period of time.

docs/book/src/topics/gke/disabling.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Disabling GKE Support
2+
3+
Support for GKE is disabled by default when you use the GCP infrastructure provider.

docs/book/src/topics/gke/enabling.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Enabling GKE Support
2+
3+
Enabling GKE support is done via the **GKE** feature flag by setting it to true. This can be done before running `clusterctl init` by using the **EXP_CAPG_GKE** environment variable:
4+
5+
```shell
6+
export EXP_CAPG_GKE=true
7+
clusterctl init --infrastructure gcp
8+
```

docs/book/src/topics/gke/index.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# GKE Support in the GCP Provider
2+
3+
- **Feature status:** Experimental
4+
- **Feature gate (required):** GKE=true
5+
6+
## Overview
7+
8+
The GCP provider supports creating GKE based cluster. Currently the following features are supported:
9+
10+
- Provisioning/managing a GCP GKE Cluster
11+
- Upgrading the Kubernetes version of the GKE Cluster
12+
- Creating a managed node pool and attaching it to the GKE cluster
13+
14+
The implementation introduces the following CRD kinds:
15+
16+
- GCPManagedCluster - presents the properties needed to provision and manage the general GCP operating infrastructure for the cluster (i.e project, networking, iam)
17+
- GCPManagedControlPlane - specifies the GKE Cluster in GCP and used by the Cluster API GCP Managed Control plane
18+
- GCPManagedMachinePool - defines the managed node pool for the cluster
19+
20+
And a new template is available in the templates folder for creating a managed workload cluster.
21+
22+
## SEE ALSO
23+
24+
* [Enabling GKE Support](enabling.md)
25+
* [Disabling GKE Support](disabling.md)
26+
* [Creating a cluster](creating-a-cluster.md)
27+
* [Cluster Upgrades](cluster-upgrades.md)

0 commit comments

Comments
 (0)