spec_type: deployment name: Deployment Configuration version: "1.0" docker: base_image: node:20-alpine build_stages: - name: builder commands: - COPY package*.json ./ - RUN npm ci - COPY . . - RUN npm run build - name: runtime commands: - COPY --from=builder /app/dist ./dist - CMD ["node", "dist/main.js"] kubernetes: namespace: production deployments: - name: api-server replicas: 3 image: app/api:latest resources: requests: cpu: 250m memory: 512Mi limits: cpu: 1000m memory: 1Gi health_checks: liveness: path: /health port: 8080 initial_delay: 30 readiness: path: /ready port: 8080 services: - name: api-service type: ClusterIP port: 80 target_port: 8080 ingress: host: api.example.com tls: true annotations: kubernetes.io/ingress.class: nginx cert-manager.io/cluster-issuer: letsencrypt autoscaling: enabled: true min_replicas: 3 max_replicas: 10 metrics: - type: cpu target_utilization: 70 - type: memory target_utilization: 80