-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Anurag Guda
committed
Dec 18, 2020
1 parent
becfd04
commit 98988f4
Showing
2 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<h1> Terraform on GCP </h1> | ||
|
||
For kubernetes with kubeadm multi node cluster we need to bring up multi nodes with help of terraform | ||
|
||
- Prerequisites | ||
- Google Cloud account | ||
- Login Google cloud account with below commands | ||
- gcloud init | ||
- gcloud beta compute config-ssh | ||
- gcloud auth application-default login | ||
Make sure you have an access to your Google account | ||
|
||
If you want to modify any details like number of worker node, use variable.tf file to refer that | ||
|
||
### Usage | ||
|
||
Make sure to inititate the terraform to load all plugins | ||
|
||
``` | ||
terraform init | ||
``` | ||
|
||
Now verify the terrafor plan with below command | ||
|
||
``` | ||
terraform plan | ||
``` | ||
|
||
Once verify the plan, now apply the terraform state to aws account | ||
|
||
``` | ||
terraform apply -auto-aprrove | ||
``` | ||
|
||
To create a ansible inventory, run the below command . if you want to change the format of inventory file modify outputs.tf file. | ||
|
||
``` | ||
terraform output inventory > ../ansible/inventory | ||
``` | ||
|