CI/CD for Kubernetes (Automate Builds and Deployments)
GitHub Actions / Jenkins: Automate Docker builds and K8s deployments.
Example GitHub Action:
yaml
Copy code
name: CI/CD Pipeline
on: [push]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build Docker Image
run: docker build -t username/myapp:${{ github.sha }} .
- name: Push to Docker Hub
run: docker push username/myapp:${{ github.sha }}
- name: Deploy to K8s
run: |
kubectl set image deployment/myapp-deployment myapp=username/myapp:${{ github.sha }}
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)