Use this skill when the user wants to create a new Kubernetes environment, clone an existing environment, deploy to a new namespace, or spin up a new environment in the cluster. Triggered by phrases like "create a new environment", "new env", "spin up env", "clone staging", "copy dev to", or "/new-env".
Create a new Kubernetes environment overlay and deploy it to the cluster, either scaffolded from base or copied from an existing environment. All overlay files are created directly using the Write tool — no external scripts required.
/new-env <env-name>
/new-env <env-name> --from <source-env>
Examples:
/new-env sit
/new-env sit --from dev
/new-env luat --from staging
/new-env luat --staging # shorthand for --from staging
The five services in this project are:
api-gateway, user-service, product-service, order-service, notification-service
sit)--from <source-env> = copy from an existing overlay instead of scaffolding from base--staging means --from stagingRun both commands and summarise findings for the user:
kubectl get namespaces
kubectl get deployments --all-namespaces -o custom-columns='NAMESPACE:.metadata.namespace,NAME:.metadata.name,IMAGE:.spec.template.spec.containers[0].image'
Report: existing environments (namespace prefixes), services running, and image tags in use.
Without --from — scaffold from base by creating these files for each service using the Write tool:
k8s/overlays/<env-name>/versions.env:
api-gateway=latest
user-service=latest
product-service=latest
order-service=latest
notification-service=latest
k8s/overlays/<env-name>/kustomization.yaml:
apiVersion: kustomize.config.k8s.io/v1beta1