You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proyecto de ejemplo para aprender Kubernetes en Azure (AKS) con una API .NET 8 + SQLite, Docker, Terraform (backend remoto en Azure Storage), Azure Container Registry (ACR) y CI/CD con GitHub Actions. Incluye workflows para**crear**y**destruir**la infraestructura automáticamente.
3
+
Sample project to learn how to deploy a .NET 8 + SQLite API to **Azure Kubernetes Service (AKS)** using Docker, Terraform (with Azure remote backend), Azure Container Registry (ACR), and CI/CD pipelines with GitHub Actions. Includes automated workflows to**create**and**destroy**the infrastructure.
- El nombre del ACR en Terraform está configurado como `k8sdotnetacr` (debe ser único globalmente).
109
-
- El `deployment.yaml` usa el marcador `<ACR_LOGIN_SERVER>` que es sustituido por el workflow `cd.yml` automáticamente.
110
-
- SQLite se monta en `/app/data/movies.db` mediante un PVC con Azure Disk. Para escalar horizontalmente, deberías usar una base de datos externa como Azure SQL.
158
+
- The ACR name in Terraform is `k8sdotnetacr` (must be globally unique).
159
+
- The `deployment.yaml` uses `containerPort: 8080`, so service must map `targetPort: 8080`.
160
+
-`cd.yml` replaces the image reference dynamically with the one from ACR.
161
+
- SQLite is persisted in `/app/data/movies.db` using a PVC backed by Azure Disk.
162
+
- For production or horizontal scaling, switch to an external database like Azure SQL.
111
163
112
164
---
113
165
114
-
## 🧹 Limpieza
166
+
## 🧹 Cleanup
115
167
116
-
Para evitar costos innecesarios, ejecuta el workflow manual:
168
+
To avoid unwanted Azure costs, go to GitHub → **Actions** tab → manually trigger:
117
169
118
170
```
119
171
Terraform Destroy Infra
120
172
```
121
173
122
-
Desde la pestaña **Actions** en GitHub.
123
-
124
174
---
125
175
126
-
¡Disfruta aprendiendo AKS! 💪
176
+
Enjoy learning AKS and GitHub Actions! 🚀
177
+
178
+
## 📦 Sample Data
179
+
180
+
Once deployed, you can test the API with some sample movie records:
181
+
182
+
```bash
183
+
curl -X POST http://<EXTERNAL-IP>/movies -H "Content-Type: application/json" -d '{"title":"Matrix","year":1999}'
184
+
curl -X POST http://<EXTERNAL-IP>/movies -H "Content-Type: application/json" -d '{"title":"Inception","year":2010}'
185
+
curl -X POST http://<EXTERNAL-IP>/movies -H "Content-Type: application/json" -d '{"title":"Interstellar","year":2014}'
186
+
curl -X POST http://<EXTERNAL-IP>/movies -H "Content-Type: application/json" -d '{"title":"The Dark Knight","year":2008}'
0 commit comments