Back to MD Exchange
    Automation Workflowskubernetesdockerci-cdhelmdevopsgithub-actions

    Kubernetes Deployment Workflow

    Complete CI/CD pipeline blueprint for Kubernetes — Dockerfile, Helm charts, GitHub Actions, monitoring, auto-scaling, and rollback strategies.

    K
    keygroup|March 25, 2026
    0 downloads0 stars

    Uploaded markdown content, not a verification of tool compatibility or results. Review the raw text, commands, and permissions before using it. Stars require an account.


    name: k8s-deploy-workflow
    description: Production Kubernetes deployment pipeline


    Kubernetes Deployment Workflow

    Ship to production with confidence.

    Pipeline Stages

    1. Build → Docker multi-stage build (optimized layers)
    2. Test → Unit + integration in CI
    3. Scan → Trivy vulnerability scanning
    4. Push → Container registry (ECR/GCR/GHCR)
    5. Deploy → Helm upgrade with canary strategy
    6. Verify → Health checks + smoke tests
    7. Monitor → Prometheus alerts + Grafana dashboards

    Files Included

    .github/workflows/deploy.yml    # GitHub Actions pipeline
    Dockerfile                       # Multi-stage optimized build
    helm/
      Chart.yaml                     # Helm chart definition
      values.yaml                    # Default values
      values-prod.yaml               # Production overrides
      templates/
        deployment.yaml              # Pod spec with probes
        service.yaml                 # ClusterIP service
        ingress.yaml                 # Nginx ingress with TLS
        hpa.yaml                     # Horizontal Pod Autoscaler
        pdb.yaml                     # Pod Disruption Budget
    monitoring/
      alerts.yaml                    # Prometheus alert rules
      dashboard.json                 # Grafana dashboard
    

    Auto-Scaling Config

    • Min replicas: 2
    • Max replicas: 20
    • CPU target: 70%
    • Memory target: 80%
    • Scale-up cooldown: 60s
    • Scale-down cooldown: 300s

    Rollback Strategy

    Automatic rollback triggers:

    • Error rate > 5% for 2 minutes
    • P99 latency > 2s for 5 minutes
    • Pod crash loop detected
    • Health check failures > 3