All Projects
DevOpsadvanced View on GitHub

Zero-to-Production Pipeline

Deploy a .NET API to Azure with Terraform, GitHub Actions, and AKS

4–6 hours (requires Azure subscription)10 technologies5 guided steps

About This Project

Take a .NET API from code to production on Azure Kubernetes Service. Covers infrastructure as code with Terraform (AKS, PostgreSQL, Redis, Key Vault), multi-stage GitHub Actions CI/CD, Docker multi-stage builds, Helm chart packaging, and full monitoring with Azure Monitor + Prometheus.

What You'll Learn

Provision cloud infrastructure from code using Terraform
Build and push Docker images in a GitHub Actions pipeline
Deploy to Kubernetes using Helm with environment-specific config
Manage secrets with Azure Key Vault in a .NET application
Set up horizontal autoscaling and zero-downtime deployments

Key Features

Terraform modules for AKS, ACR, PostgreSQL, Redis, Key Vault
Multi-stage Docker build (build → publish → runtime image, <50 MB final)
GitHub Actions pipeline: lint → test → build → push → deploy
Helm chart for the application with configurable values
Kubernetes manifests: Deployment, Service, HPA, NetworkPolicy
Azure Key Vault integration for all secrets (no secrets in code or CI vars)
Horizontal Pod Autoscaler based on CPU + custom metrics
Rolling deployments with zero downtime
Prometheus metrics + Grafana dashboard
Automated rollback on failed health checks

Setup Guide

1

Clone and configure

Clone the repo and configure your Azure settings.

bash
git clone https://github.com/asmanasir/zero-to-production.git
cd zero-to-production
cp terraform/terraform.tfvars.example terraform/terraform.tfvars
# Edit terraform.tfvars with your Azure subscription ID
2

Provision infrastructure with Terraform

Creates AKS cluster, ACR, PostgreSQL, Redis, and Key Vault.

bash
cd terraform
terraform init
terraform plan
terraform apply
3

Configure kubectl

Point kubectl at your new AKS cluster.

bash
az aks get-credentials --resource-group rg-micromart --name aks-micromart

Running the Project

1

Push to main branch to trigger deployment

The GitHub Actions pipeline builds, tests, and deploys automatically.

bash
git push origin main
# Watch the Actions tab in GitHub
# Deployment completes in ~5 minutes
2

Verify the deployment

Check all pods are running and get the public URL.

bash
kubectl get pods -n production
kubectl get services -n production

# Get the external IP
kubectl get ingress -n production

Project Info

CategoryDevOps
Difficultyadvanced
Setup time4–6 hours (requires Azure subscription)
Technologies10 tools

Tech Stack

Azure Kubernetes Service (AKS)TerraformGitHub ActionsDockerHelmAzure Container RegistryAzure Key VaultPostgreSQL (Azure)PrometheusGrafana

Prerequisites

  • Azure subscription (free tier works for learning)
  • Azure CLI installed and authenticated
  • Terraform CLI installed
  • kubectl installed
  • Docker Desktop installed
View Source on GitHub
L

Learnixo

Project Author

Covers the full 'Make It Production-Ready' and 'Scale & Optimize' sections of the .NET roadmap. This is what DevOps engineers and senior .NET developers are expected to set up.