File tree Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ bash k8scluster.sh google
51
51
To clean up the AWS environment with kubernetes, run the below command
52
52
53
53
```
54
- cd terrform/google
54
+ cd terrform/gcp
55
55
terraform destroy -auto-approve
56
56
```
57
57
Original file line number Diff line number Diff line change
1
+ <h1 > Terraform on GCP </h1 >
2
+
3
+ For kubernetes with kubeadm multi node cluster we need to bring up multi nodes with help of terraform
4
+
5
+ - Prerequisites
6
+ - Google Cloud account
7
+ - Login Google cloud account with below commands
8
+ - gcloud init
9
+ - gcloud beta compute config-ssh
10
+ - gcloud auth application-default login
11
+ Make sure you have an access to your Google account
12
+
13
+ If you want to modify any details like number of worker node, use variable.tf file to refer that
14
+
15
+ ### Usage
16
+
17
+ Make sure to inititate the terraform to load all plugins
18
+
19
+ ```
20
+ terraform init
21
+ ```
22
+
23
+ Now verify the terrafor plan with below command
24
+
25
+ ```
26
+ terraform plan
27
+ ```
28
+
29
+ Once verify the plan, now apply the terraform state to aws account
30
+
31
+ ```
32
+ terraform apply -auto-aprrove
33
+ ```
34
+
35
+ To create a ansible inventory, run the below command . if you want to change the format of inventory file modify outputs.tf file.
36
+
37
+ ```
38
+ terraform output inventory > ../ansible/inventory
39
+ ```
40
+
You can’t perform that action at this time.
0 commit comments