Skip to content

Commit

Permalink
Dev (#2): Added Remote Backend
Browse files Browse the repository at this point in the history
* added backend.tf to correct folder

* "added backend details to readme"
  • Loading branch information
solamarpreet authored Apr 27, 2023
1 parent 84d6178 commit 2fb3ed8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,30 @@ The following must already be present on your system
nano secret.tfvars
```

4. Initialize terraform
4. Configure Remote Backend by adding your Terraform Cloud Backend details in the backend.tf file
```sh
nano backend.tf
```
```sh
terraform login
```

or delete the backend.tf file if Remote Backend is not needed
```sh
rm backend.tf
```

5. Initialize terraform
```sh
terraform init
```

5. Apply terraform configuration
6. Apply terraform configuration
```sh
terraform apply --var-file=secret.tfvars
```

6. Install either Microk8s or K3s on the created infrastructure depending on your preference
7. Install either Microk8s or K3s on the created infrastructure depending on your preference
```sh
cd ../ansible
```
Expand All @@ -113,12 +126,12 @@ The following must already be present on your system
ansible-playbook playbooks/k3s.yml
```

7. Copy the kubeconfig file to ~/.kube/config
8. Copy the kubeconfig file to ~/.kube/config
```sh
mkdir -p ~/.kube && cp kubeconfig ~/.kube/config
```

8. Start using kubectl commands
9. Start using kubectl commands
```sh
kubectl get nodes
```
Expand Down
File renamed without changes.

0 comments on commit 2fb3ed8

Please sign in to comment.