Skip to content

Commit 98988f4

Browse files
author
Anurag Guda
committed
kubernetes on cloud
1 parent becfd04 commit 98988f4

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ bash k8scluster.sh google
5151
To clean up the AWS environment with kubernetes, run the below command
5252

5353
```
54-
cd terrform/google
54+
cd terrform/gcp
5555
terraform destroy -auto-approve
5656
```
5757

‎terraform/gcp/Readme.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+

0 commit comments

Comments
 (0)