...
Before proceeding, go to Release Information, and download the gcp.tar.gz
file for the Usage Engine Private Edition version that is being installed. Once downloaded, extract its content to a suitable location.
Assumptions
There are a few assumptions been made when using terraform to create cluster resources:
We assume you have an existing parent domain i.e. example.com hosted on the same project as the cluster that we going to create in the coming section and you wish to access the cluster environment through the hostname. Terraform will create a subdomain in format
<cluster_name>.<domain>
.cluster name: uepe-gke
domain: example.com
final domain: uepe-gke.example.com
In addition, we also assume terraform is allowed to add a NS (NameServer) record to the parent domain. This is to allow DNS delegation from the parent domain to subdomain.
Please note that in case your parent domain is not under the same project or your parent domain is hosted in another cloud provider, then you must set
auto_create_ns_record
to false in the terraform template to disable subdomain NS record auto creation in parent domain.The service hostname that created by Usage Engine Private Edition will be accessible in format
<service_name>.<cluster_name>.<domain>
i.e. desktop-online.uepe-gke.example.com.Terraform need to persist the state of your provisioned infrastructure, by default the state file is stored locally on the computer that terraform is executed from. However if you have multiple person working on the infrastructure then it is recommended to store the state file on remote persistent such as Cloud Storage bucket, see https://cloud.google.com/docs/terraform/resource-management/store-state for more information.
We use Filestore (NFS) as the default persistent storage for data needs to be persisted.
We use Cloud SQL for Usage Engine Private Edition database, default instance type is PostgreSQL.
Create Basic Cluster and additional infrastructure
The following steps explains how to create a basic Kubernetes cluster with public and private VPC:
Go to
<the location where you extracted the gcp.tar.gz file>/gcp/terraform
and copy theterraform.tfvars.example
toterraform.tfvars
.Edit the
terraform.tfvars
file.Specify the desired cluster
name
, GCPregion
andkubernetes_version prefix
(please refer to the Compatibility Matrix to find out which Kubernetes versions that are compatible with this release of Usage Engine Private Edition). Also specify your GCPproject id
(which can be found on the GCP dashboard), as well as the desired number of nodes per region (gke_num_nodes
).If you will be running with a database other than Derby also specify
db_password
,db_version
anddb_allocated_storage
.
...
You can check the status of the cluster, db and the other resources in the GCP dashboard.
Configure Cluster Access
kubectl
and other Kubernetes clients require an authentication plugin, gke-gcloud-auth-plugin
, which uses the Client-go Credential Plugins framework to provide authentication tokens to communicate with GKE clusters.
...
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Persistent Volume and Persistent Volume Claim
Info |
---|
Please note that persistent volume setup is an optional step. Skip this section if you are not intended to have persistent file storage. |
...
This section is now complete. Now proceed to the Kubernetes Cluster Add-ons - GCP section.