Skip to content

5 Deploy Web App

5 Deploy Web App #17

Workflow file for this run

name: 5 Deploy Web App
on: [workflow_dispatch]
env:
CLUSTER_NAME: AKSClsuter-Demo
AZURE_RG: oa-poc-rg
NAMESPACE: appconfig
IMAGE_NAME: oawebappconfig
AZURE_CONTAINER_REGISTRY: ${{ secrets.CONTAINER_REGISTRY }}
KUSTOMIZE_PATH: './yaml_files/'
TAG: 5141
jobs:
deploy-webapp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
# Set the target AKS cluster.
- uses: Azure/aks-set-context@v1
with:
creds: '${{ secrets.AZURE_CREDENTIALS }}'
cluster-name: ${{ env.CLUSTER_NAME }}
resource-group: ${{ env.AZURE_RG }}
- uses: azure/[email protected]
- name: Set up Kustomize
run: |-
curl -sfLo kustomize https://github.com/kubernetes-sigs/kustomize/releases/download/v3.1.0/kustomize_3.1.0_linux_amd64
chmod u+x ./kustomize
./kustomize --help
- name: Create Namespace
run: |
kubectl create ns ${{ env.NAMESPACE }}
# Deploy the Docker image to the GKE cluster
- name: Deploy
run: |-
# replacing the image name in the k8s template
cd yaml_files
./kustomize edit set image ${{ env.AZURE_CONTAINER_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
./kustomize build . | kubectl apply -f -