Getting everything ready for you…

Loading courses, problems and your progress. This takes just a moment.

0s

Projects › Advanced

CI/CD Pipeline & Kubernetes Deployment

Take any MERN app to production the DevOps way: containers, automated tests and deploys, Kubernetes, and monitoring.

Level: Advanced · Time: 2 weeks · Tech stack: Docker, GitHub Actions, Kubernetes, Helm, Prometheus

Features to build

What you will learn

Step-by-step guide

1. Dockerise

Multi-stage builds: build the React app, serve it with nginx; run the API as a non-root user. Add .dockerignore.

2. CI with GitHub Actions

on: { push: { branches: [main] } }
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci && npm test
      - uses: docker/build-push-action@v6
        with: { push: true, tags: "ghcr.io/${{ github.repository }}/api:${{ github.sha }}" }

Tag images with the commit SHA so every deploy is traceable.

3. Kubernetes manifests (or a Helm chart)

Deployment (replicas, resources, readiness/liveness probes), Service, Ingress with cert-manager TLS, ConfigMap + Secret for env vars.

4. Deploy step

After pushing the image, helm upgrade --install app ./chart --set image.tag=$SHA — Kubernetes rolls out without downtime; kubectl rollout undo rolls back.

5. Scale

HorizontalPodAutoscaler on CPU; load-test and watch pods scale.

6. Observe

kube-prometheus-stack: Grafana dashboards for latency, errors and pod health; an alert when the error rate goes up.

Level it up

On your resume

Learn on Codify