feat(terraform): add EKS module with variables and outputs #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Kubernetes Deployment | |
| on: | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v2 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-east-1 | |
| - name: Update kubeconfig | |
| run: | | |
| aws eks update-kubeconfig --name my-cluster --region us-east-1 | |
| - name: Deploy with Helm | |
| run: | | |
| helm upgrade --install my-app ./kubernetes/helm/app-chart \ | |
| -f kubernetes/helm/values-prod.yaml \ | |
| --namespace production \ | |
| --create-namespace | |
| - name: Wait for Rollout | |
| run: | | |
| kubectl rollout status deployment/my-app -n production | |
| - name: Verify Deployment | |
| run: | | |
| kubectl get deployments -n production | |
| kubectl get pods -n production |