$npx -y skills add ancoleman/ai-design-components --skill deploying-applicationsDeployment patterns from Kubernetes to serverless and edge functions. Use when deploying applications, setting up CI/CD, or managing infrastructure. Covers Kubernetes (Helm, ArgoCD), serverless (Vercel, Lambda), edge (Cloudflare Workers, Deno), IaC (Pulumi, OpenTofu, SST), and Gi
| 1 | # Deploying Applications |
| 2 | |
| 3 | Production deployment patterns from Kubernetes to serverless and edge functions. Bridges the gap from application assembly to production infrastructure. |
| 4 | |
| 5 | ## Purpose |
| 6 | |
| 7 | This skill provides clear guidance for: |
| 8 | - Selecting the right deployment strategy (Kubernetes, serverless, containers, edge) |
| 9 | - Implementing Infrastructure as Code with Pulumi or OpenTofu |
| 10 | - Setting up GitOps automation with ArgoCD or Flux |
| 11 | - Choosing serverless databases (Neon, Turso, PlanetScale) |
| 12 | - Deploying edge functions (Cloudflare Workers, Deno Deploy) |
| 13 | |
| 14 | ## When to Use This Skill |
| 15 | |
| 16 | Use this skill when: |
| 17 | - Deploying applications to production infrastructure |
| 18 | - Setting up CI/CD pipelines and GitOps workflows |
| 19 | - Choosing between Kubernetes, serverless, or edge deployment |
| 20 | - Implementing Infrastructure as Code (Pulumi, OpenTofu, SST) |
| 21 | - Migrating from manual deployment to automated infrastructure |
| 22 | - Integrating with `assembling-components` for complete deployment flow |
| 23 | |
| 24 | ## Deployment Strategy Decision Tree |
| 25 | |
| 26 | ``` |
| 27 | WORKLOAD TYPE? |
| 28 | |
| 29 | ├── COMPLEX MICROSERVICES (10+ services) |
| 30 | │ └─ Kubernetes + ArgoCD/Flux (GitOps) |
| 31 | │ ├─ Helm 4.0 for packaging |
| 32 | │ ├─ Service mesh: Linkerd (5-10% overhead) or Istio (25-35%) |
| 33 | │ └─ See references/kubernetes-patterns.md |
| 34 | |
| 35 | ├── VARIABLE TRAFFIC / COST-SENSITIVE |
| 36 | │ └─ Serverless |
| 37 | │ ├─ Database: Neon/Turso (scale-to-zero) |
| 38 | │ ├─ Compute: Vercel, AWS Lambda, Cloud Functions |
| 39 | │ ├─ Edge: Cloudflare Workers (<5ms cold start) |
| 40 | │ └─ See references/serverless-dbs.md and references/edge-functions.md |
| 41 | |
| 42 | ├── CONSISTENT LOAD / PREDICTABLE TRAFFIC |
| 43 | │ └─ Containers (ECS, Cloud Run, Fly.io) |
| 44 | │ ├─ ECS Fargate: AWS-native, serverless containers |
| 45 | │ ├─ Cloud Run: GCP, scale-to-zero containers |
| 46 | │ └─ Fly.io: Global edge, multi-region |
| 47 | |
| 48 | ├── GLOBAL LOW-LATENCY (<50ms) |
| 49 | │ └─ Edge Functions + Edge Database |
| 50 | │ ├─ Cloudflare Workers + D1 (SQLite) |
| 51 | │ ├─ Deno Deploy + Turso (libSQL) |
| 52 | │ └─ See references/edge-functions.md |
| 53 | |
| 54 | └── RAPID PROTOTYPING / STARTUP MVP |
| 55 | └─ Managed Platform as a Service |
| 56 | ├─ Vercel (Next.js, zero-config) |
| 57 | ├─ Railway (any framework) |
| 58 | └─ Render (auto-deploy from Git) |
| 59 | |
| 60 | IaC CHOICE? |
| 61 | |
| 62 | ├─ TypeScript-first → Pulumi (Apache 2.0, multi-cloud) |
| 63 | ├─ HCL-based → OpenTofu (CNCF, Terraform-compatible) |
| 64 | └─ Serverless TypeScript → SST v3 (built on Pulumi) |
| 65 | ``` |
| 66 | |
| 67 | ## Core Concepts |
| 68 | |
| 69 | ### Infrastructure as Code (IaC) |
| 70 | |
| 71 | Define infrastructure using code instead of manual configuration. |
| 72 | |
| 73 | **Primary: Pulumi (TypeScript)** |
| 74 | - Context7 ID: `/pulumi/docs` (Trust: 94.6/100, 9,525 snippets) |
| 75 | - TypeScript-first (same language as React/Next.js) |
| 76 | - Multi-cloud support (AWS, GCP, Azure, Cloudflare) |
| 77 | - See references/pulumi-guide.md for patterns and examples |
| 78 | |
| 79 | **Alternative: OpenTofu (HCL)** |
| 80 | - CNCF project, Terraform-compatible |
| 81 | - MPL-2.0 license (open governance) |
| 82 | - Drop-in Terraform replacement |
| 83 | - See references/opentofu-guide.md for migration |
| 84 | |
| 85 | **Serverless: SST v3 (TypeScript)** |
| 86 | - Built on Pulumi |
| 87 | - Optimized for AWS Lambda, API Gateway |
| 88 | - Live Lambda development |
| 89 | |
| 90 | ### GitOps Deployment |
| 91 | |
| 92 | Declarative infrastructure with Git as source of truth. |
| 93 | |
| 94 | **ArgoCD** (Recommended for platform teams): |
| 95 | - Rich web UI |
| 96 | - Built-in RBAC and multi-tenancy |
| 97 | - Self-healing deployments |
| 98 | - See references/gitops-argocd.md |
| 99 | |
| 100 | **Flux** (Recommended for DevOps automation): |
| 101 | - Kubernetes-native |
| 102 | - CLI-focused |
| 103 | - Simpler architecture |
| 104 | - See references/gitops-argocd.md |
| 105 | |
| 106 | ### Service Mesh |
| 107 | |
| 108 | Optional layer for microservices communication, security, and observability. |
| 109 | |
| 110 | **When to Use Service Mesh**: |
| 111 | - Multi-team microservices (security boundaries) |
| 112 | - Zero-trust networking (mTLS required) |
| 113 | - Advanced traffic management (canary, blue-green) |
| 114 | |
| 115 | **When NOT to Use**: |
| 116 | - Simple monolith or 2-3 services (overhead not justified) |
| 117 | - Serverless architectures (incompatible) |
| 118 | |
| 119 | **Linkerd** (Performance-focused): |
| 120 | - 5-10% overhead |
| 121 | - Rust-based |
| 122 | - Simple, opinionated |
| 123 | |
| 124 | **Istio** (Feature-rich): |
| 125 | - 25-35% overhead |
| 126 | - C++ (Envoy) |
| 127 | - Advanced routing, observability |
| 128 | |
| 129 | See references/kubernetes-patterns.md for service mesh patterns. |
| 130 | |
| 131 | ## Quick Start Workflows |
| 132 | |
| 133 | ### Workflow 1: Deploy Next.js to Vercel (Zero-Config) |
| 134 | |
| 135 | ```bash |
| 136 | # Install Vercel CLI |
| 137 | npm i -g vercel |
| 138 | |
| 139 | # Link project |
| 140 | vercel link |
| 141 | |
| 142 | # Deploy to production |
| 143 | vercel --prod |
| 144 | ``` |
| 145 | |
| 146 | See examples/nextjs-vercel/ for complete example. |
| 147 | |
| 148 | ### Workflow 2: Deploy to Kubernetes with ArgoCD |
| 149 | |
| 150 | 1. Create Helm chart |
| 151 | 2. Push chart to Git repository |
| 152 | 3. Create ArgoCD Application |
| 153 | 4. ArgoCD syncs automatically |
| 154 | |
| 155 | See examples/k8s-argocd/ for complete GitOps setup. |
| 156 | |
| 157 | ### Workflow 3: Deploy Serverless with Pulumi |
| 158 | |
| 159 | ```typescript |
| 160 | import * as pulumi from "@pulumi/pulumi"; |
| 161 | import * as aws from "@pulumi/aws |