|
1 | 1 |  |
| 2 | + |
2 | 3 |  |
3 | 4 |  |
4 | 5 |  |
@@ -71,6 +72,35 @@ docker tag fibonacci_rust:latest ${DOCKER_USERNAME}/fibonacci_rust:v24 |
71 | 72 | docker push ${DOCKER_USERNAME}/fibonacci_rust:v24 |
72 | 73 | ``` |
73 | 74 |
|
| 75 | +## 1. Deploying the Application to Kubernetes via Terraform |
| 76 | +> [!TIP] |
| 77 | +> This repository includes a simple Terraform module (in the terraform/ directory) that deploys the fibonacci container into Kubernetes. The key files are: |
| 78 | +> - main.tf – Terraform configuration. |
| 79 | +
|
| 80 | +### 1.1 Deploy the Application |
| 81 | +> [!TIP] |
| 82 | +> Navigate to the terraform/ directory and run the following commands to deploy the application: |
| 83 | +```sh |
| 84 | +terraform init |
| 85 | +``` |
| 86 | + |
| 87 | +```sh |
| 88 | +terraform validate |
| 89 | +``` |
| 90 | + |
| 91 | +```sh |
| 92 | +terraform apply |
| 93 | +``` |
| 94 | + |
| 95 | +- Once all resources are deployed you can start the minikube service to access the application. |
| 96 | +```sh |
| 97 | +minikube service fibonacci-service |
| 98 | +``` |
| 99 | + |
| 100 | +- You can go to this section to see about monitoring [2.5 Monitoring the Application with Prometheus and Grafana](#25-monitoring-the-application-with-prometheus-and-grafana) |
| 101 | + |
| 102 | + |
| 103 | + |
74 | 104 | ## 2. Deploying the Application to Kubernetes |
75 | 105 | ### 2.1 Deploy via Helm Charts - Helm Chart Overview |
76 | 106 | > [!TIP] |
@@ -136,7 +166,7 @@ minikube service fibonacci-service |
136 | 166 | kubectl exec -it <your-pod-name> -- /bin/sh |
137 | 167 | cat fibonacci.log |
138 | 168 | ``` |
139 | | -2.5 Monitoring the Application with Prometheus and Grafana |
| 169 | +### 2.5 Monitoring the Application with Prometheus and Grafana |
140 | 170 | > [!TIP] |
141 | 171 | > You can monitor the application using Prometheus and Grafana. |
142 | 172 |
|
|
0 commit comments