Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tools-only/X-Skills --skill k8s-manifest-generate명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Index of Build Systems Skills
Coordination patterns for distributed dataflow systems including barriers, epochs, and distributed snapshots
Windowing, sessionization, time-series aggregation, and late data handling for streaming systems
SOC 직업 분류 기준
SKILL.md 표시 중
| name | k8s-manifest-generate |
| description | Generate production-ready Kubernetes manifests |
| shortcut | km |
| category | devops |
| difficulty | intermediate |
| estimated_time | 2 minutes |
Generates complete, production-ready Kubernetes manifests with best practices (health checks, resource limits, security contexts, auto-scaling).
/k8s-helm-chart instead)kubectl run)You are a Kubernetes expert. When user runs /k8s-manifest-generate or /km:
Detect application type:
Ask key questions:
Generate manifest set:
Apply best practices:
Provide deployment guide:
---
# All manifests in single file
# Can be applied with: kubectl apply -f manifests.yaml
## Deployment Instructions
### 1. Update secrets:
[List of secrets to update]
### 2. Apply manifests:
```bash
kubectl apply -f manifests.yaml
kubectl get pods -n <namespace>
## Examples
### Example 1: Node.js Web App
**User:** `/km`
**Questions:**
- App type? → Stateless web app
- Image? → `myregistry/webapp:1.0.0`
- Port? → `3000`
- Resources? → `250m CPU, 512Mi memory`
- Storage? → No
- External access? → Yes (Ingress)
- Auto-scale? → Yes (2-10 replicas)
**Output:**
```yaml
---
# webapp-manifests.yaml
# Production-ready Kubernetes manifests for Node.js web app
apiVersion: v1
kind: Namespace
metadata:
name: webapp
---
apiVersion: v1
kind: ConfigMap
metadata:
name: webapp-config
namespace: webapp
data:
NODE_ENV: "production"
LOG_LEVEL: "info"
PORT: "3000"
---
apiVersion: v1
kind: Secret
metadata:
name: webapp-secrets
namespace: webapp
type: Opaque
stringData:
# UPDATE THESE VALUES BEFORE APPLYING!
DATABASE_URL: "postgresql://user:pass@db:5432/dbname"
API_KEY: "your-api-key-here"
JWT_SECRET: "your-secret-here"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: webapp
namespace: webapp
labels:
app: webapp
spec:
replicas: 3
selector:
matchLabels:
app: webapp
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
app: webapp
spec:
securityContext:
runAsNonRoot: true
runAsUser: 1001
containers:
- name: webapp
image: myregistry/webapp:1.0.0
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 3000
envFrom:
- configMapRef:
name: webapp-config
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: webapp-secrets
key: DATABASE_URL
resources:
requests:
cpu: 250m
memory: 512Mi
limits:
cpu: 500m
memory: 1Gi
livenessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /ready
port: http
initialDelaySeconds: 10
periodSeconds: 5
---
apiVersion: v1
kind: Service
metadata:
name: webapp
namespace: webapp
spec:
type: ClusterIP
selector:
app: webapp
ports:
- port: 80
targetPort: http
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: webapp
namespace: webapp
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
ingressClassName: nginx
tls:
- hosts:
- webapp.example.com
secretName: webapp-tls
rules:
- host: webapp.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: webapp
port:
number: 80
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: webapp
namespace: webapp
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: webapp
minReplicas: 2
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70
User: /km
Questions:
postgres:15-alpine5432500m CPU, 2Gi memoryOutput:
---
# postgres-manifests.yaml
# Production-ready PostgreSQL StatefulSet
apiVersion: v1
kind: Namespace
metadata:
name: database
---
apiVersion: v1
kind: Secret
metadata:
name: postgres-secrets
namespace: database
type: Opaque
stringData:
# UPDATE THESE VALUES!
POSTGRES_DB: "myapp"
POSTGRES_USER: "admin"
POSTGRES_PASSWORD: "strong-password-here"
---
apiVersion: v1
kind: ConfigMap
metadata:
name: postgres-config
namespace: database
data:
postgresql.conf: |
max_connections = 200
shared_buffers = 512MB
effective_cache_size = 1536MB
work_mem = 4MB
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: postgres
namespace: database
spec:
[]
User: /km
Questions:
myregistry/data-sync:1.0.01 CPU, 2Gi memoryOutput:
---
# data-sync-cronjob.yaml
apiVersion: v1
kind: Namespace
metadata:
name: batch-jobs
---
apiVersion: v1
kind: Secret
metadata:
name: sync-secrets
namespace: batch-jobs
type: Opaque
stringData:
# UPDATE THESE VALUES!
S3_ACCESS_KEY: "your-access-key"
S3_SECRET_KEY: "your-secret-key"
DATABASE_URL: "postgresql://user:pass@db/dbname"
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: data-sync
namespace: batch-jobs
spec:
schedule: "0 2 * * *" # Every day at 2 AM UTC
concurrencyPolicy: Forbid # Don't run concurrent jobs
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 3
jobTemplate:
spec:
template:
metadata:
Always set resource limits (prevents cluster instability) Use readiness probes (prevents routing to unhealthy pods) Non-root user is critical for security StatefulSets for databases, Deployments for apps Use namespaces to isolate applications
Issue: Pod stuck in Pending
→ Check resources: kubectl describe pod <pod> -n <namespace>
→ Verify node capacity sufficient for requests
Issue: Pod CrashLoopBackOff
→ Check logs: kubectl logs <pod> -n <namespace> --previous
→ Verify health check endpoints exist
Issue: Service not accessible
→ Check endpoints: kubectl get endpoints -n <namespace>
→ Verify readiness probe passing
Issue: Image ImagePullBackOff → Verify image name and tag correct → Check registry credentials if private