-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 1013 Bytes
/
tetrisaks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Deploy to AKS
on:
push:
branches:
- master # Set the branch you want to trigger the deployment on
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Kubernetes CLI
uses: azure/setup-kubectl@v1
with:
version: 'v1.29.7' # Corrected to match the Kubernetes versioning
- name: Create .kube directory
run: mkdir -p $HOME/.kube
- name: Set up Kubeconfig
run: |
echo "${{ secrets.KUBE_CONFIG_DATA }}" | base64 -d > $HOME/.kube/config
- name: Deploy manifests
run: |
kubectl apply -f k8-manifest/k8-deployment.yaml
kubectl apply -f k8-manifest/k8-service.yaml
kubectl apply -f k8-manifest/metrics-server.yaml
kubectl apply -f k8-manifest/tetris-hpa.yaml
- name: Verify Deployment
run: |
kubectl rollout status deployment/tetris-deployment
kubectl get pods