You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 4, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+44-42Lines changed: 44 additions & 42 deletions
Original file line number
Diff line number
Diff line change
@@ -7,54 +7,56 @@ This module is available on [Terraform registry](https://registry.terraform.io/m
7
7
The module is designed to be used by Jetstack customers to make it easier for them to create clusters that are secure and follow Jetstack recommendations.
8
8
It gives them flexibility with certain properties so the cluster can be customised to their needs, but gives fixed values for properties that could lead to issues or insecurity.
9
9
10
-
## Customisable Properties
10
+
## Deprecation
11
+
12
+
The `0.3` release of this module is planned to be the final release.
13
+
After this the module will be deprecated in favour of [Google's GKE module](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine).
14
+
Jetstack will be producing an example project using Google's module as well as migration guidance.
15
+
16
+
## Requirements
11
17
12
-
The module allows for properties of the cluster to be customised by setting Terraform resource arguments with input variables.
13
-
These are:
18
+
The module requires an existing Google Cloud project, with VPC network and subnetwork for the cluster to use.
19
+
The subnetwork must be in the same region as the cluster and have pod and service ranges specified.
20
+
21
+
## Customisable Properties
14
22
15
-
- GCP project ID
16
-
- Cluster name
17
-
- GCP location
18
-
- Specify a zone for a zonal cluster (e.g. europe-west1-b)
19
-
- Specify a region for a regional cluster (e.g. europe-west1)
20
-
- Maintenance window start time
23
+
The module allows the cluster to be extensively customised using input variables.
24
+
These can be found with documentation in [`variables.tf`](variables.tf).
25
+
26
+
The customisable properties include:
27
+
- Release channel or minimum master version
28
+
- Private nodes
29
+
- Master private endpoint
30
+
- Master authorised network CIDR blocks
31
+
- Master CIDR block
32
+
- Node service account container registry access
33
+
- Google security group for RBAC
34
+
- Workload identity namespace
35
+
- Enable Stackdriver logging and monitoring
36
+
- Enable Google Cloud HTTP load balancing
37
+
- Enable pod security policy controller
38
+
- Daily maintenance window start time
21
39
- Node pools
22
40
- Name
23
-
- Initial size
41
+
- Inital node count
42
+
- Minimum and maximum number of nodes for autoscaling
43
+
- Enable automatic repair and upgrade
24
44
- Machine type
25
-
- Disk type and size
26
-
- Autoscaling min and max
27
-
- Enable auto repair and upgrade
28
-
- VPC network and subnetwork names
29
-
- Cluster and service range name
30
-
- Enable access to private GCR images (defaults to false)
31
-
- Disable HTTP load balancing (defaults to false, i.e. HTTP load balancing is enabled)
32
-
- Master CIDR block (defaults to 172.16.0.0/28)
33
-
- Master authorized CIDR blocks (defaults to 0.0.0.0/0 i.e. everywhere)
34
-
- Enabling Stackdriver Kubernetes logging and monitoring
35
-
36
-
Note that the VPC network and subnetwork specified must already exist.
37
-
The subnetwork must also have the cluster and service ranges specified.
45
+
- Disk size and type
46
+
- Use preemptible nodes
47
+
- Kubernetes version
38
48
39
49
## Fixed Arguments
40
50
41
-
Many of the properties of the cluster are set as Terraform resource arguments with fixed values.
42
-
These values are based on Jetstack's recommended best-practice settings.
43
-
These are:
44
-
45
-
- Setting master version to latest
46
-
- Enabling private nodes so they aren't reachable externally
47
-
- Disabling private master so it is reachable externally (this can be restricted with master authorized CIDR blocks)
48
-
- Enabling network policy for nodes using Calico
49
-
- Enabling network policy master addon
50
-
- Disabling basic authentication and client certificate issuing
51
-
- Disabling Kubernetes dashboard (Google Cloud Console should be used instead)
52
-
- Use of VPC native networking (using a specified network and subnetwork)
53
-
- Enabling IP aliases
54
-
- Removing the default node pool and creating one or more new pools with Terraform for easier management
55
-
- Setting the OAuth scope of nodes to `cloud-platform` to manage permissions with IAM
56
-
- Disabling node legacy endpoints
57
-
- Creating an IAM service account for nodes with the minimum required roles
51
+
Some of the properties of the cluster are fixed based on Jetstack's recommended best-practice settings:
52
+
- Enabling network policy for nodes and master using Calico.
53
+
- Disabling basic authentication and client certificate issuing.
54
+
- Disabling Kubernetes dashboard (Google Cloud Console should be used instead).
55
+
- Use of VPC native networking (using a specified network and subnetwork).
56
+
- Removing the default node pool and creating one or more new pools with Terraform for easier management.
57
+
- Setting the OAuth scope of nodes to `cloud-platform` to manage permissions with IAM.
58
+
- Disabling node legacy endpoints.
59
+
- Creating an IAM service account for nodes with the minimum required roles:
58
60
- Logging log writer
59
61
- Monitoring metric writer
60
62
- Monitoring viewer
@@ -67,7 +69,7 @@ It can be used directly from the Terraform Registry like so:
67
69
```
68
70
module "gke-cluster" {
69
71
source = "jetstack/gke-cluster/google"
70
-
version = "0.2.0-alpha1"
72
+
version = "0.3.0"
71
73
72
74
# insert the 9 required variables here
73
75
}
@@ -79,7 +81,7 @@ There is an [example project](https://github.com/jetstack/terraform-google-gke-c
79
81
80
82
## Limitations
81
83
82
-
Note that because the module sets them to be private the **nodes do not have direct access to the internet**.
84
+
If private nodes are used then **nodes will not have direct access to the internet**.
83
85
This means they cannot pull images hosted outside of the container registry in the same project as the cluster.
84
86
The example project features a [Cloud NAT](https://cloud.google.com/nat/docs/overview) to give the nodes to access the internet.
0 commit comments