# Deploy

> Generate K8s manifests — Deployment, Service, ConfigMap, HPA, Ingress.

- Skill: `khaitrang1995/deploy` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add khaitrang1995/deploy`
- Raw SKILL.md: https://api.skillmd.com/api/skills/khaitrang1995/deploy/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: KhaiTrang1995 (https://skillmd.com/u/khaitrang1995)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/khaitrang1995/deploy

---


# /deploy — Generate Kubernetes Manifests

## Input examples
```
/deploy container-api --namespace prod --replicas 3 --with-ingress
/deploy angular-app --namespace staging
/deploy worker-service --replicas 2
```

## Output
```
k8s/{app-name}/
  deployment.yaml
  service.yaml
  configmap.yaml
  hpa.yaml             (auto-scale)
  ingress.yaml          (if --with-ingress)
  kustomization.yaml
```

## Mandatory rules
- **Resource limits** (cpu/memory) are mandatory — never deploy without setting limits
- **Liveness + Readiness probes** for every container
- **ConfigMap/Secret** for config — NEVER hardcode env vars in the deployment
- **Standard labels**: `app`, `version`, `team`, `environment`
- **Explicit namespace**, NEVER use `default`
- **Rolling update** strategy (maxSurge: 1, maxUnavailable: 0)
- **Security context**: runAsNonRoot, readOnlyRootFilesystem

## References
- @.claude/rules/k8s-conventions.md

