원클릭으로
k8s-yaml-generator
Generate/create/scaffold Kubernetes YAML — Deployment, Service, ConfigMap, Ingress, RBAC, StatefulSet, CRDs.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Generate/create/scaffold Kubernetes YAML — Deployment, Service, ConfigMap, Ingress, RBAC, StatefulSet, CRDs.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Validate, lint, audit, or fix .gitlab-ci.yml pipelines, stages, and jobs.
Generate, create, or scaffold Ansible playbooks, roles, tasks, handlers, inventory, vars.
Validate, lint, audit, or debug Ansible playbooks, roles, inventories, FQCN, tasks.
Generate/create/scaffold azure-pipelines.yml, stages, jobs, steps, or reusable templates.
Validate, lint, audit, or review azure-pipelines.yml — syntax, security, best practices.
Generate/create Fluent Bit configs — INPUT, FILTER, OUTPUT, parsers, log pipeline.
| name | k8s-yaml-generator |
| description | Generate/create/scaffold Kubernetes YAML — Deployment, Service, ConfigMap, Ingress, RBAC, StatefulSet, CRDs. |
Generate Kubernetes manifests with deterministic steps, bounded CRD research, and mandatory validation for full-resource output.
Use this skill when the user asks to create or update Kubernetes YAML, for example:
Do not use this skill for validation-only requests. For validation-only work, use k8s-yaml-validator.
Normative keywords:
MUST: requiredSHOULD: default unless user requests otherwiseMAY: optionalDeterministic sequence:
If one step is blocked by environment constraints, execute that step's fallback and continue.
Before generation:
Preflight stop condition:
Collect:
Deployment, Service, ConfigMap, CRD kind, etc.)apiVersion + kindSafe defaults (state explicitly in output):
default (namespace-scoped resources)2ClusterIPIfNotPresent (unless user needs forced pulls)Run this step only for custom APIs outside Kubernetes built-in groups.
Extract:
argoproj.io/v1alpha1, Application)v2.9.x)Use the correct Context7 tools and payloads:
mcp__context7__resolve-library-idmcp__context7__query-docsSample payloads:
Tool: mcp__context7__resolve-library-id
libraryName: "argo-cd"
query: "Find Argo CD documentation for Application CRD schema compatibility"
Tool: mcp__context7__query-docs
libraryId: "/argoproj/argo-cd/v2.9.0"
query: "Application CRD required spec fields for apiVersion argoproj.io/v1alpha1 with minimal valid example"
Selection rules:
libraryId when user specifies a version.Bound the lookup to prevent unbounded retries:
resolve-library-id: max 2 attempts (primary name + one alternate name).query-docs: max 3 focused queries total.Stop early when all are true:
Hard stop when budgets are exhausted:
Needs confirmation.kubectl explain <kind>.spec when available).Use this order:
resolve-library-id -> query-docs)kubectl explain, if cluster access exists)If none are available, provide a minimal, clearly marked draft and do not claim full CRD correctness.
Apply these checks:
app.kubernetes.io/*) across related resources.securityContext to avoid root execution by default.Minimal label baseline:
labels:
app.kubernetes.io/name: myapp
app.kubernetes.io/instance: myapp-prod
app.kubernetes.io/part-of: myplatform
app.kubernetes.io/managed-by: codex
For full manifest generation, validation is mandatory.
Primary path:
k8s-yaml-validator.Required reporting after each validation pass:
Validation mode: k8s-yaml-validator | script fallback | manual fallbackSyntax: pass/failSchema: pass/fail/partialCRD check: pass/fail/partialDry-run: server/client/skippedBlocking issues remaining: yes/noContingency A: validator skill unavailable
Run direct commands:
bash devops-skills-plugin/skills/k8s-yaml-validator/scripts/setup_tools.sh
yamllint -c devops-skills-plugin/skills/k8s-yaml-validator/assets/.yamllint <file.yaml>
kubeconform -schema-location default -strict -ignore-missing-schemas -summary <file.yaml>
server_out="$(mktemp)"
client_out="$(mktemp)"
trap 'rm -f "$server_out" "$client_out"' EXIT
if kubectl apply --dry-run=server -f <file.yaml> >"$server_out" 2>&1; then
echo "server_validation=passed"
elif grep -Eqi "connection refused|no such host|i/o timeout|tls handshake timeout|unable to connect to the server|no configuration has been provided|the server doesn't have a resource type" "$server_out"; then
echo "server_validation=skipped"
if kubectl apply --dry-run=client -f <file.yaml> >"$client_out" 2>&1; then
echo "client_validation=passed"
else
echo "client_validation=failed"
cat "$client_out"
exit 1
fi
else
echo "server_validation=failed"
cat "$server_out"
exit 1
fi
Contingency B: local tools partially unavailable
Contingency C: repeated validation failure
Validation exceptions:
Validation status: Skipped (reason).Final output MUST include:
Suggested next commands:
kubectl apply -f <filename>.yaml
kubectl get <resource-type> <name> -n <namespace>
kubectl describe <resource-type> <name> -n <namespace>
k8s-yaml-validator.argoproj.io/v1alpha1 + Application.resolve-library-id then query-docs).Execution is complete only when all applicable checks pass: