mirror of
https://github.com/ghndrx/terraform-gke-cluster.git
synced 2026-02-10 06:55:01 +00:00
modify variables in README for easier copy paste
This commit is contained in:
@@ -10,15 +10,19 @@ This repository contains Terraform code for creating a Google Kubernetes Engine
|
|||||||
## Usage
|
## Usage
|
||||||
1. Clone this repository
|
1. Clone this repository
|
||||||
2. Create a `terraform.tfvars` file and set the following variables:
|
2. Create a `terraform.tfvars` file and set the following variables:
|
||||||
- `my-project-id`: The ID of your GCP project
|
my-project-id = "your_gcp_project_id"
|
||||||
- `my-cluster`: The name of your GKE cluster
|
my-cluster = "your_gke_cluster_name"
|
||||||
- `google_region`: The region where your GKE cluster will be created
|
google_region = "your_gcp_region"
|
||||||
- `machine_type`: The machine type for your GKE nodes
|
machine_type = "your_gke_node_machine_type"
|
||||||
- `username`: The username for the master auth of your GKE cluster
|
username = "your_gke_cluster_username"
|
||||||
- `password`: The password for the master auth of your GKE cluster
|
password = "your_gke_cluster_password"
|
||||||
|
|
||||||
|
Copy code
|
||||||
3. Run `terraform init` to initialize the Terraform working directory
|
3. Run `terraform init` to initialize the Terraform working directory
|
||||||
4. Run `terraform apply` to create the GKE cluster
|
4. Run `terraform apply` to create the GKE cluster
|
||||||
|
|
||||||
|
***Please note that you need to replace the your_gcp_project_id,your_gke_cluster_name,your_gcp_region,your_gke_node_machine_type,your_gke_cluster_username,your_gke_cluster_password with your own values.
|
||||||
|
|
||||||
## Notes
|
## 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 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.
|
- 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.
|
||||||
|
|||||||
Reference in New Issue
Block a user