Skip to content

Generate Specs from Running Apps

Reverse-engineer a deploy.yaml from a live Kubernetes deployment.

Generate

helm-me app generate-spec my-app --namespace production

This inspects the running Deployment, Service, and Ingress resources and creates a helm-me spec that matches them.

Custom Output

Specify the output file and format:

helm-me app generate-spec my-app -o deploy.yaml
helm-me app generate-spec my-app -o deploy.py --fmt python

Workflow

  1. Generate a spec from a running app
  2. Lint the generated spec to validate
  3. Render to compare output with the live cluster
  4. Iterate — tweak the spec until render matches your expectations
  5. Deploy to take ownership
helm-me app generate-spec legacy-api --namespace prod -o deploy.yaml
helm-me lint deploy.yaml
helm-me diff deploy.yaml
helm-me deploy deploy.yaml --yes

What is Captured vs. Approximated

Reverse-engineering a declarative spec from a live cluster is an approximation.

Captured correctly: - Container images, ports, and environment variables - Replicas, limits, and requests - Ingress hosts and paths

Approximated or ignored: - Unknown annotations or labels (ignored) - Mounted ConfigMaps or external PVCs (ignored, requires manual DSL adjustment) - Complex rollout strategies (ignored, defaults to standard RollingUpdate)

Tip

Always run helm-me diff deploy.yaml (or helm-me render | kubectl diff) before taking ownership to see exactly what helm-me will change. This is the recommended path for migrating existing Kubernetes deployments to helm-me.