mirror of
https://github.com/ghndrx/terraform-gke-cluster.git
synced 2026-02-10 06:55:01 +00:00
add readme
This commit is contained in:
28
terraform-gke/README.md
Normal file
28
terraform-gke/README.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Terraform Cluster
|
||||
|
||||
This repository contains Terraform code for creating a Google Kubernetes Engine (GKE) cluster.
|
||||
|
||||
## Prerequisites
|
||||
- Terraform 0.14 or later
|
||||
- A Google Cloud Platform (GCP) project with the necessary permissions to create a GKE cluster
|
||||
- A service account with the necessary permissions to create a GKE cluster
|
||||
|
||||
## Usage
|
||||
1. Clone this repository
|
||||
2. Create a `terraform.tfvars` file and set the following variables:
|
||||
- `my-project-id`: The ID of your GCP project
|
||||
- `my-cluster`: The name of your GKE cluster
|
||||
- `google_region`: The region where your GKE cluster will be created
|
||||
- `machine_type`: The machine type for your GKE nodes
|
||||
- `username`: The username for the master auth of your GKE cluster
|
||||
- `password`: The password for the master auth of your GKE cluster
|
||||
3. Run `terraform init` to initialize the Terraform working directory
|
||||
4. Run `terraform apply` to create the GKE cluster
|
||||
|
||||
## Notes
|
||||
- This code creates a GKE cluster with a single node. You can adjust the node_count variable in `main.tf` to create a cluster with more nodes.
|
||||
- This code also creates a firewall rule that allows incoming traffic on port 80. You can adjust the firewall rule in `main.tf` to suit your needs.
|
||||
|
||||
## Cleanup
|
||||
To delete the resources created by this code, run `terraform destroy`.
|
||||
|
||||
Reference in New Issue
Block a user