Go to: GitHub Repo β Settings β Secrets β Actions
Add these 5 secrets:
| Secret | Value |
|---|---|
DOCKER_USERNAME |
Your Docker Hub username |
DOCKER_PASSWORD |
Docker Hub token (create here) |
AZURE_CREDENTIALS |
Azure service principal JSON (see below) |
AZURE_RESOURCE_GROUP |
Your AKS resource group (e.g., planify-rg) |
AZURE_AKS_CLUSTER |
Your AKS cluster name (e.g., planify-aks) |
az ad sp create-for-rbac \
--name "planify-github-actions" \
--role contributor \
--scopes /subscriptions/YOUR_SUBSCRIPTION_ID/resourceGroups/YOUR_RESOURCE_GROUP \
--sdk-authCopy the JSON output β Save as AZURE_CREDENTIALS secret.
Edit kubernetes/app.yaml (line 51):
image: YOUR_DOCKERHUB_USERNAME/planify:latest
imagePullPolicy: Alwaysdocker build -t YOUR_USERNAME/planify:latest .
docker login
docker push YOUR_USERNAME/planify:latest
./kubernetes/deploy.shNow every git push origin main = automatic deployment!
git push origin main
β
GitHub Actions triggered
β
[1] Build Docker image
[2] Push to Docker Hub
[3] Deploy to Azure AKS
[4] Rolling update (zero downtime)
[5] Health check verification
β
β
Live in 3-5 minutes!
Watch progress: GitHub β Actions tab
- Check GitHub Actions logs
- Verify Docker Hub credentials
- Ensure image exists:
docker pull YOUR_USERNAME/planify:latest - Check AKS connection:
kubectl get nodes
kubectl rollout undo deployment/planify-app -n planifyThat's it! Simple and automatic. π