How to deploy to dev
Deploy your changes to the AKS aucert-dev namespace for testing.
Prerequisites
az loginauthenticatedkubectlconfigured with AKS context (az aks get-credentials --resource-group aucert-rg --name aucert-aks)- Docker running locally
- ACR login:
az acr login --name aucertacr41e0x5
Steps
Step 1: Build Docker image
docker build \
-t aucertacr41e0x5.azurecr.io/backend:latest \
-f backend/platform/Dockerfile \
backend/platform/
tip
For faster builds during development, use the --target dev stage if the Dockerfile has a multi-stage build. For production-like testing, omit --target to build the full image.
Step 2: Push to ACR
docker push aucertacr41e0x5.azurecr.io/backend:latest
Verify the image was pushed:
az acr repository show-tags --name aucertacr41e0x5 --repository backend --output table
Step 3: Deploy via Helm
helm upgrade --install aucert-dev k8s/charts/aucert \
-n aucert-dev \
-f k8s/charts/aucert/values/dev.yaml
This applies the dev values overlay, which sets:
- Replica count: 1
- Resource limits: low (for cost)
- Image pull policy: Always (to pick up
:latestchanges) - Dev-specific ConfigMaps and secrets
Step 4: Verify deployment
# Check pod status (should show Running within ~60s)
kubectl get pods -n aucert-dev
# Watch pod startup
kubectl get pods -n aucert-dev -w
# Check recent logs
kubectl logs -n aucert-dev -l app=backend --tail=50
Expected: Pods transition from ContainerCreating → Running. Logs show Started AucertPlatformApplication.
Step 5: Smoke test
# Port-forward the service
kubectl port-forward -n aucert-dev svc/aucert-backend 8080:8080
# Hit the health endpoint
curl http://localhost:8080/health
# Expected: {"status": "UP"}
Deploying frontend changes
The frontend deploys as a separate container:
# Build
docker build \
-t aucertacr41e0x5.azurecr.io/frontend:latest \
-f frontend/apps/console/Dockerfile \
frontend/apps/console/
# Push
docker push aucertacr41e0x5.azurecr.io/frontend:latest
# Deploy (same Helm chart, frontend is a separate deployment)
helm upgrade --install aucert-dev k8s/charts/aucert \
-n aucert-dev \
-f k8s/charts/aucert/values/dev.yaml
Rolling back
If a deployment breaks, roll back to the previous version:
# Check rollout history
helm history aucert-dev -n aucert-dev
# Roll back to previous release
helm rollback aucert-dev -n aucert-dev
# Or roll back to a specific revision
helm rollback aucert-dev 3 -n aucert-dev
Troubleshooting
ImagePullBackOff
The pod can't pull the image from ACR. Fix:
- Re-authenticate:
az acr login --name aucertacr41e0x5 - Verify image exists:
az acr repository show-tags --name aucertacr41e0x5 --repository backend - Check AKS has ACR pull permission:
az aks check-acr --resource-group aucert-rg --name aucert-aks --acr aucertacr41e0x5
CrashLoopBackOff
The pod starts but crashes immediately. Debug:
# Check logs from the crashed container
kubectl logs -n aucert-dev <pod-name> --previous
# Common causes:
# - Missing environment variables → check ConfigMap/Secret
# - Database connection failed → check port-forward or VNet connectivity
# - OOM kill → check resource limits in values/dev.yaml
Pods stuck in Pending
Usually a resource issue:
# Check events
kubectl describe pod -n aucert-dev <pod-name>
# Common causes:
# - Insufficient CPU/memory → scale down replicas or increase node pool
# - PVC not bound → check storage class and PV availability
Helm upgrade fails with "another operation in progress"
A previous Helm operation didn't clean up. Fix:
# Check Helm release status
helm status aucert-dev -n aucert-dev
# If stuck in "pending-upgrade" or "pending-install"
helm rollback aucert-dev -n aucert-dev
What's next
- How to debug AKS pods — Detailed pod troubleshooting
- How to update Helm charts — Modify deployment configuration
- How to deploy to staging — Production-like environment