[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F1F2ZVPWEV4F34DNTKQD1K":3,"skill-same:01M6F1F2ZVPWEV4F34DNTKQD1K":93},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":47,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M6F1F2ZVPWEV4F34DNTKQD1K","k8s-manifest-generator",null,"Create production-ready Kubernetes manifests for Deployments, Services, ConfigMaps, and Secrets following best practices and security standards. Use when generating Kubernetes YAML manifests, creating K8s resources, or implementing production-grade Kubernetes configurations.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fwshobson\u002Fk8s-manifest-generator\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],"generator","k8s","k8s manifest generator","manifest","use","resources","security standards","deployments","standards","ready","kubernetes","secrets","Production","services","yaml","best practices","create","security","2026-11-10 10:12:30",false,"---\nname: k8s-manifest-generator\ndescription: Create production-ready Kubernetes manifests for Deployments, Services, ConfigMaps, and Secrets following best practices and security standards. Use when generating Kubernetes YAML manifests, creating K8s resources, or implementing production-grade Kubernetes configurations.\n---\n\n# Kubernetes Manifest Generator\n\nStep-by-step guidance for creating production-ready Kubernetes manifests including Deployments, Services, ConfigMaps, Secrets, and PersistentVolumeClaims.\n\n## Purpose\n\nThis skill provides comprehensive guidance for generating well-structured, secure, and production-ready Kubernetes manifests following cloud-native best practices and Kubernetes conventions.\n\n## When to Use This Skill\n\nUse this skill when you need to:\n- Create new Kubernetes Deployment manifests\n- Define Service resources for network connectivity\n- Generate ConfigMap and Secret resources for configuration management\n- Create PersistentVolumeClaim manifests for stateful workloads\n- Follow Kubernetes best practices and naming conventions\n- Implement resource limits, health checks, and security contexts\n- Design manifests for multi-environment deployments\n\n## Step-by-Step Workflow\n\n### 1. Gather Requirements\n\n**Understand the workload:**\n- Application type (stateless\u002Fstateful)\n- Container image and version\n- Environment variables and configuration needs\n- Storage requirements\n- Network exposure requirements (internal\u002Fexternal)\n- Resource requirements (CPU, memory)\n- Scaling requirements\n- Health check endpoints\n\n**Questions to ask:**\n- What is the application name and purpose?\n- What container image and tag will be used?\n- Does the application need persistent storage?\n- What ports does the application expose?\n- Are there any secrets or configuration files needed?\n- What are the CPU and memory requirements?\n- Does the application need to be exposed externally?\n\n### 2. Create Deployment Manifest\n\n**Follow this structure:**\n\n```yaml\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: \u003Capp-name>\n  namespace: \u003Cnamespace>\n  labels:\n    app: \u003Capp-name>\n    version: \u003Cversion>\nspec:\n  replicas: 3\n  selector:\n    matchLabels:\n      app: \u003Capp-name>\n  template:\n    metadata:\n      labels:\n        app: \u003Capp-name>\n        version: \u003Cversion>\n    spec:\n      containers:\n      - name: \u003Ccontainer-name>\n        image: \u003Cimage>:\u003Ctag>\n        ports:\n        - containerPort: \u003Cport>\n          name: http\n        resources:\n          requests:\n            memory: \"256Mi\"\n            cpu: \"250m\"\n          limits:\n            memory: \"512Mi\"\n            cpu: \"500m\"\n        livenessProbe:\n          httpGet:\n            path: \u002Fhealth\n            port: http\n          initialDelaySeconds: 30\n          periodSeconds: 10\n        readinessProbe:\n          httpGet:\n            path: \u002Fready\n            port: http\n          initialDelaySeconds: 5\n          periodSeconds: 5\n        env:\n        - name: ENV_VAR\n          value: \"value\"\n        envFrom:\n        - configMapRef:\n            name: \u003Capp-name>-config\n        - secretRef:\n            name: \u003Capp-name>-secret\n```\n\n**Best practices to apply:**\n- Always set resource requests and limits\n- Implement both liveness and readiness probes\n- Use specific image tags (never `:latest`)\n- Apply security context for non-root users\n- Use labels for organization and selection\n- Set appropriate replica count based on availability needs\n\n**Reference:** See `references\u002Fdeployment-spec.md` for detailed deployment options\n\n### 3. Create Service Manifest\n\n**Choose the appropriate Service type:**\n\n**ClusterIP (internal only):**\n```yaml\napiVersion: v1\nkind: Service\nmetadata:\n  name: \u003Capp-name>\n  namespace: \u003Cnamespace>\n  labels:\n    app: \u003Capp-name>\nspec:\n  type: ClusterIP\n  selector:\n    app: \u003Capp-name>\n  ports:\n  - name: http\n    port: 80\n    targetPort: 8080\n    protocol: TCP\n```\n\n**LoadBalancer (external access):**\n```yaml\napiVersion: v1\nkind: Service\nmetadata:\n  name: \u003Capp-name>\n  namespace: \u003Cnamespace>\n  labels:\n    app: \u003Capp-name>\n  annotations:\n    service.beta.kubernetes.io\u002Faws-load-balancer-type: nlb\nspec:\n  type: LoadBalancer\n  selector:\n    app: \u003Capp-name>\n  ports:\n  - name: http\n    port: 80\n    targetPort: 8080\n    protocol: TCP\n```\n\n**Reference:** See `references\u002Fservice-spec.md` for service types and networking\n\n### 4. Create ConfigMap\n\n**For application configuration:**\n\n```yaml\napiVersion: v1\nkind: ConfigMap\nmetadata:\n  name: \u003Capp-name>-config\n  namespace: \u003Cnamespace>\ndata:\n  APP_MODE: production\n  LOG_LEVEL: info\n  DATABASE_HOST: db.example.com\n  # For config files\n  app.properties: |\n    server.port=8080\n    server.host=0.0.0.0\n    logging.level=INFO\n```\n\n**Best practices:**\n- Use ConfigMaps for non-sensitive data only\n- Organize related configuration together\n- Use meaningful names for keys\n- Consider using one ConfigMap per component\n- Version ConfigMaps when making changes\n\n**Reference:** See `assets\u002Fconfigmap-template.yaml` for examples\n\n### 5. Create Secret\n\n**For sensitive data:**\n\n```yaml\napiVersion: v1\nkind: Secret\nmetadata:\n  name: \u003Capp-name>-secret\n  namespace: \u003Cnamespace>\ntype: Opaque\nstringData:\n  DATABASE_PASSWORD: \"changeme\"\n  API_KEY: \"secret-api-key\"\n  # For certificate files\n  tls.crt: |\n    -----BEGIN CERTIFICATE-----\n    ...\n    -----END CERTIFICATE-----\n  tls.key: |\n    -----BEGIN PRIVATE KEY-----\n    ...\n    -----END PRIVATE KEY-----\n```\n\n**Security considerations:**\n- Never commit secrets to Git in plain text\n- Use Sealed Secrets, External Secrets Operator, or Vault\n- Rotate secrets regularly\n- Use RBAC to limit secret access\n- Consider using Secret type: `kubernetes.io\u002Ftls` for TLS secrets\n\n### 6. Create PersistentVolumeClaim (if needed)\n\n**For stateful applications:**\n\n```yaml\napiVersion: v1\nkind: PersistentVolumeClaim\nmetadata:\n  name: \u003Capp-name>-data\n  namespace: \u003Cnamespace>\nspec:\n  accessModes:\n  - ReadWriteOnce\n  storageClassName: gp3\n  resources:\n    requests:\n      storage: 10Gi\n```\n\n**Mount in Deployment:**\n```yaml\nspec:\n  template:\n    spec:\n      containers:\n      - name: app\n        volumeMounts:\n        - name: data\n          mountPath: \u002Fvar\u002Flib\u002Fapp\n      volumes:\n      - name: data\n        persistentVolumeClaim:\n          claimName: \u003Capp-name>-data\n```\n\n**Storage considerations:**\n- Choose appropriate StorageClass for performance needs\n- Use ReadWriteOnce for single-pod access\n- Use ReadWriteMany for multi-pod shared storage\n- Consider backup strategies\n- Set appropriate retention policies\n\n### 7. Apply Security Best Practices\n\n**Add security context to Deployment:**\n\n```yaml\nspec:\n  template:\n    spec:\n      securityContext:\n        runAsNonRoot: true\n        runAsUser: 1000\n        fsGroup: 1000\n        seccompProfile:\n          type: RuntimeDefault\n      containers:\n      - name: app\n        securityContext:\n          allowPrivilegeEscalation: false\n          readOnlyRootFilesystem: true\n          capabilities:\n            drop:\n            - ALL\n```\n\n**Security checklist:**\n- [ ] Run as non-root user\n- [ ] Drop all capabilities\n- [ ] Use read-only root filesystem\n- [ ] Disable privilege escalation\n- [ ] Set seccomp profile\n- [ ] Use Pod Security Standards\n\n### 8. Add Labels and Annotations\n\n**Standard labels (recommended):**\n\n```yaml\nmetadata:\n  labels:\n    app.kubernetes.io\u002Fname: \u003Capp-name>\n    app.kubernetes.io\u002Finstance: \u003Cinstance-name>\n    app.kubernetes.io\u002Fversion: \"1.0.0\"\n    app.kubernetes.io\u002Fcomponent: backend\n    app.kubernetes.io\u002Fpart-of: \u003Csystem-name>\n    app.kubernetes.io\u002Fmanaged-by: kubectl\n```\n\n**Useful annotations:**\n\n```yaml\nmetadata:\n  annotations:\n    description: \"Application description\"\n    contact: \"team@example.com\"\n    prometheus.io\u002Fscrape: \"true\"\n    prometheus.io\u002Fport: \"9090\"\n    prometheus.io\u002Fpath: \"\u002Fmetrics\"\n```\n\n### 9. Organize Multi-Resource Manifests\n\n**File organization options:**\n\n**Option 1: Single file with `---` separator**\n```yaml\n# app-name.yaml\n---\napiVersion: v1\nkind: ConfigMap\n...\n---\napiVersion: v1\nkind: Secret\n...\n---\napiVersion: apps\u002Fv1\nkind: Deployment\n...\n---\napiVersion: v1\nkind: Service\n...\n```\n\n**Option 2: Separate files**\n```\nmanifests\u002F\n├── configmap.yaml\n├── secret.yaml\n├── deployment.yaml\n├── service.yaml\n└── pvc.yaml\n```\n\n**Option 3: Kustomize structure**\n```\nbase\u002F\n├── kustomization.yaml\n├── deployment.yaml\n├── service.yaml\n└── configmap.yaml\noverlays\u002F\n├── dev\u002F\n│   └── kustomization.yaml\n└── prod\u002F\n    └── kustomization.yaml\n```\n\n### 10. Validate and Test\n\n**Validation steps:**\n\n```bash\n# Dry-run validation\nkubectl apply -f manifest.yaml --dry-run=client\n\n# Server-side validation\nkubectl apply -f manifest.yaml --dry-run=server\n\n# Validate with kubeval\nkubeval manifest.yaml\n\n# Validate with kube-score\nkube-score score manifest.yaml\n\n# Check with kube-linter\nkube-linter lint manifest.yaml\n```\n\n**Testing checklist:**\n- [ ] Manifest passes dry-run validation\n- [ ] All required fields are present\n- [ ] Resource limits are reasonable\n- [ ] Health checks are configured\n- [ ] Security context is set\n- [ ] Labels follow conventions\n- [ ] Namespace exists or is created\n\n## Common Patterns\n\n### Pattern 1: Simple Stateless Web Application\n\n**Use case:** Standard web API or microservice\n\n**Components needed:**\n- Deployment (3 replicas for HA)\n- ClusterIP Service\n- ConfigMap for configuration\n- Secret for API keys\n- HorizontalPodAutoscaler (optional)\n\n**Reference:** See `assets\u002Fdeployment-template.yaml`\n\n### Pattern 2: Stateful Database Application\n\n**Use case:** Database or persistent storage application\n\n**Components needed:**\n- StatefulSet (not Deployment)\n- Headless Service\n- PersistentVolumeClaim template\n- ConfigMap for DB configuration\n- Secret for credentials\n\n### Pattern 3: Background Job or Cron\n\n**Use case:** Scheduled tasks or batch processing\n\n**Components needed:**\n- CronJob or Job\n- ConfigMap for job parameters\n- Secret for credentials\n- ServiceAccount with RBAC\n\n### Pattern 4: Multi-Container Pod\n\n**Use case:** Application with sidecar containers\n\n**Components needed:**\n- Deployment with multiple containers\n- Shared volumes between containers\n- Init containers for setup\n- Service (if needed)\n\n## Templates\n\nThe following templates are available in the `assets\u002F` directory:\n\n- `deployment-template.yaml` - Standard deployment with best practices\n- `service-template.yaml` - Service configurations (ClusterIP, LoadBalancer, NodePort)\n- `configmap-template.yaml` - ConfigMap examples with different data types\n- `secret-template.yaml` - Secret examples (to be generated, not committed)\n- `pvc-template.yaml` - PersistentVolumeClaim templates\n\n## Reference Documentation\n\n- `references\u002Fdeployment-spec.md` - Detailed Deployment specification\n- `references\u002Fservice-spec.md` - Service types and networking details\n\n## Best Practices Summary\n\n1. **Always set resource requests and limits** - Prevents resource starvation\n2. **Implement health checks** - Ensures Kubernetes can manage your application\n3. **Use specific image tags** - Avoid unpredictable deployments\n4. **Apply security contexts** - Run as non-root, drop capabilities\n5. **Use ConfigMaps and Secrets** - Separate config from code\n6. **Label everything** - Enables filtering and organization\n7. **Follow naming conventions** - Use standard Kubernetes labels\n8. **Validate before applying** - Use dry-run and validation tools\n9. **Version your manifests** - Keep in Git with version control\n10. **Document with annotations** - Add context for other developers\n\n## Troubleshooting\n\n**Pods not starting:**\n- Check image pull errors: `kubectl describe pod \u003Cpod-name>`\n- Verify resource availability: `kubectl get nodes`\n- Check events: `kubectl get events --sort-by='.lastTimestamp'`\n\n**Service not accessible:**\n- Verify selector matches pod labels: `kubectl get endpoints \u003Cservice-name>`\n- Check service type and port configuration\n- Test from within cluster: `kubectl run debug --rm -it --image=busybox -- sh`\n\n**ConfigMap\u002FSecret not loading:**\n- Verify names match in Deployment\n- Check namespace\n- Ensure resources exist: `kubectl get configmap,secret`\n\n## Next Steps\n\nAfter creating manifests:\n1. Store in Git repository\n2. Set up CI\u002FCD pipeline for deployment\n3. Consider using Helm or Kustomize for templating\n4. Implement GitOps with ArgoCD or Flux\n5. Add monitoring and observability\n\n## Related Skills\n\n- `helm-chart-scaffolding` - For templating and packaging\n- `gitops-workflow` - For automated deployments\n- `k8s-security-policies` - For advanced security configurations\n","# Kubernetes Manifest Generator\n\nStep-by-step guidance for creating production-ready Kubernetes manifests including Deployments, Services, ConfigMaps, Secrets, and PersistentVolumeClaims.\n\n## Purpose\n\nThis skill provides comprehensive guidance for generating well-structured, secure, and production-ready Kubernetes manifests following cloud-native best practices and Kubernetes conventions.\n\n## When to Use This Skill\n\nUse this skill when you need to:\n- Create new Kubernetes Deployment manifests\n- Define Service resources for network connectivity\n- Generate ConfigMap and Secret resources for configuration management\n- Create PersistentVolumeClaim manifests for stateful workloads\n- Follow Kubernetes best practices and naming conventions\n- Implement resource limits, health checks, and security contexts\n- Design manifests for multi-environment deployments\n\n## Step-by-Step Workflow\n\n### 1. Gather Requirements\n\n**Understand the workload:**\n- Application type (stateless\u002Fstateful)\n- Container image and version\n- Environment variables and configuration needs\n- Storage requirements\n- Network exposure requirements (internal\u002Fexternal)\n- Resource requirements (CPU, memory)\n- Scaling requirements\n- Health check endpoints\n\n**Questions to ask:**\n- What is the application name and purpose?\n- What container image and tag will be used?\n- Does the application need persistent storage?\n- What ports does the application expose?\n- Are there any secrets or configuration files needed?\n- What are the CPU and memory requirements?\n- Does the application need to be exposed externally?\n\n### 2. Create Deployment Manifest\n\n**Follow this structure:**\n\n```yaml\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: \u003Capp-name>\n  namespace: \u003Cnamespace>\n  labels:\n    app: \u003Capp-name>\n    version: \u003Cversion>\nspec:\n  replicas: 3\n  selector:\n    matchLabels:\n      app: \u003Capp-name>\n  template:\n    metadata:\n      labels:\n        app: \u003Capp-name>\n        version: \u003Cversion>\n    spec:\n      containers:\n      - name: \u003Ccontainer-name>\n        image: \u003Cimage>:\u003Ctag>\n        ports:\n        - containerPort: \u003Cport>\n          name: http\n        resources:\n          requests:\n            memory: \"256Mi\"\n            cpu: \"250m\"\n          limits:\n            memory: \"512Mi\"\n            cpu: \"500m\"\n        livenessProbe:\n          httpGet:\n            path: \u002Fhealth\n            port: http\n          initialDelaySeconds: 30\n          periodSeconds: 10\n        readinessProbe:\n          httpGet:\n            path: \u002Fready\n            port: http\n          initialDelaySeconds: 5\n          periodSeconds: 5\n        env:\n        - name: ENV_VAR\n          value: \"value\"\n        envFrom:\n        - configMapRef:\n            name: \u003Capp-name>-config\n        - secretRef:\n            name: \u003Capp-name>-secret\n```\n\n**Best practices to apply:**\n- Always set resource requests and limits\n- Implement both liveness and readiness probes\n- Use specific image tags (never `:latest`)\n- Apply security context for non-root users\n- Use labels for organization and selection\n- Set appropriate replica count based on availability needs\n\n**Reference:** See `references\u002Fdeployment-spec.md` for detailed deployment options\n\n### 3. Create Service Manifest\n\n**Choose the appropriate Service type:**\n\n**ClusterIP (internal only):**\n```yaml\napiVersion: v1\nkind: Service\nmetadata:\n  name: \u003Capp-name>\n  namespace: \u003Cnamespace>\n  labels:\n    app: \u003Capp-name>\nspec:\n  type: ClusterIP\n  selector:\n    app: \u003Capp-name>\n  ports:\n  - name: http\n    port: 80\n    targetPort: 8080\n    protocol: TCP\n```\n\n**LoadBalancer (external access):**\n```yaml\napiVersion: v1\nkind: Service\nmetadata:\n  name: \u003Capp-name>\n  namespace: \u003Cnamespace>\n  labels:\n    app: \u003Capp-name>\n  annotations:\n    service.beta.kubernetes.io\u002Faws-load-balancer-type: nlb\nspec:\n  type: LoadBalancer\n  selector:\n    app: \u003Capp-name>\n  ports:\n  - name: http\n    port: 80\n    targetPort: 8080\n    protocol: TCP\n```\n\n**Reference:** See `references\u002Fservice-spec.md` for service types and networking\n\n### 4. Create ConfigMap\n\n**For application configuration:**\n\n```yaml\napiVersion: v1\nkind: ConfigMap\nmetadata:\n  name: \u003Capp-name>-config\n  namespace: \u003Cnamespace>\ndata:\n  APP_MODE: production\n  LOG_LEVEL: info\n  DATABASE_HOST: db.example.com\n  # For config files\n  app.properties: |\n    server.port=8080\n    server.host=0.0.0.0\n    logging.level=INFO\n```\n\n**Best practices:**\n- Use ConfigMaps for non-sensitive data only\n- Organize related configuration together\n- Use meaningful names for keys\n- Consider using one ConfigMap per component\n- Version ConfigMaps when making changes\n\n**Reference:** See `assets\u002Fconfigmap-template.yaml` for examples\n\n### 5. Create Secret\n\n**For sensitive data:**\n\n```yaml\napiVersion: v1\nkind: Secret\nmetadata:\n  name: \u003Capp-name>-secret\n  namespace: \u003Cnamespace>\ntype: Opaque\nstringData:\n  DATABASE_PASSWORD: \"changeme\"\n  API_KEY: \"secret-api-key\"\n  # For certificate files\n  tls.crt: |\n    -----BEGIN CERTIFICATE-----\n    ...\n    -----END CERTIFICATE-----\n  tls.key: |\n    -----BEGIN PRIVATE KEY-----\n    ...\n    -----END PRIVATE KEY-----\n```\n\n**Security considerations:**\n- Never commit secrets to Git in plain text\n- Use Sealed Secrets, External Secrets Operator, or Vault\n- Rotate secrets regularly\n- Use RBAC to limit secret access\n- Consider using Secret type: `kubernetes.io\u002Ftls` for TLS secrets\n\n### 6. Create PersistentVolumeClaim (if needed)\n\n**For stateful applications:**\n\n```yaml\napiVersion: v1\nkind: PersistentVolumeClaim\nmetadata:\n  name: \u003Capp-name>-data\n  namespace: \u003Cnamespace>\nspec:\n  accessModes:\n  - ReadWriteOnce\n  storageClassName: gp3\n  resources:\n    requests:\n      storage: 10Gi\n```\n\n**Mount in Deployment:**\n```yaml\nspec:\n  template:\n    spec:\n      containers:\n      - name: app\n        volumeMounts:\n        - name: data\n          mountPath: \u002Fvar\u002Flib\u002Fapp\n      volumes:\n      - name: data\n        persistentVolumeClaim:\n          claimName: \u003Capp-name>-data\n```\n\n**Storage considerations:**\n- Choose appropriate StorageClass for performance needs\n- Use ReadWriteOnce for single-pod access\n- Use ReadWriteMany for multi-pod shared storage\n- Consider backup strategies\n- Set appropriate retention policies\n\n### 7. Apply Security Best Practices\n\n**Add security context to Deployment:**\n\n```yaml\nspec:\n  template:\n    spec:\n      securityContext:\n        runAsNonRoot: true\n        runAsUser: 1000\n        fsGroup: 1000\n        seccompProfile:\n          type: RuntimeDefault\n      containers:\n      - name: app\n        securityContext:\n          allowPrivilegeEscalation: false\n          readOnlyRootFilesystem: true\n          capabilities:\n            drop:\n            - ALL\n```\n\n**Security checklist:**\n- [ ] Run as non-root user\n- [ ] Drop all capabilities\n- [ ] Use read-only root filesystem\n- [ ] Disable privilege escalation\n- [ ] Set seccomp profile\n- [ ] Use Pod Security Standards\n\n### 8. Add Labels and Annotations\n\n**Standard labels (recommended):**\n\n```yaml\nmetadata:\n  labels:\n    app.kubernetes.io\u002Fname: \u003Capp-name>\n    app.kubernetes.io\u002Finstance: \u003Cinstance-name>\n    app.kubernetes.io\u002Fversion: \"1.0.0\"\n    app.kubernetes.io\u002Fcomponent: backend\n    app.kubernetes.io\u002Fpart-of: \u003Csystem-name>\n    app.kubernetes.io\u002Fmanaged-by: kubectl\n```\n\n**Useful annotations:**\n\n```yaml\nmetadata:\n  annotations:\n    description: \"Application description\"\n    contact: \"team@example.com\"\n    prometheus.io\u002Fscrape: \"true\"\n    prometheus.io\u002Fport: \"9090\"\n    prometheus.io\u002Fpath: \"\u002Fmetrics\"\n```\n\n### 9. Organize Multi-Resource Manifests\n\n**File organization options:**\n\n**Option 1: Single file with `---` separator**\n```yaml\n# app-name.yaml\n---\napiVersion: v1\nkind: ConfigMap\n...\n---\napiVersion: v1\nkind: Secret\n...\n---\napiVersion: apps\u002Fv1\nkind: Deployment\n...\n---\napiVersion: v1\nkind: Service\n...\n```\n\n**Option 2: Separate files**\n```\nmanifests\u002F\n├── configmap.yaml\n├── secret.yaml\n├── deployment.yaml\n├── service.yaml\n└── pvc.yaml\n```\n\n**Option 3: Kustomize structure**\n```\nbase\u002F\n├── kustomization.yaml\n├── deployment.yaml\n├── service.yaml\n└── configmap.yaml\noverlays\u002F\n├── dev\u002F\n│   └── kustomization.yaml\n└── prod\u002F\n    └── kustomization.yaml\n```\n\n### 10. Validate and Test\n\n**Validation steps:**\n\n```bash\n# Dry-run validation\nkubectl apply -f manifest.yaml --dry-run=client\n\n# Server-side validation\nkubectl apply -f manifest.yaml --dry-run=server\n\n# Validate with kubeval\nkubeval manifest.yaml\n\n# Validate with kube-score\nkube-score score manifest.yaml\n\n# Check with kube-linter\nkube-linter lint manifest.yaml\n```\n\n**Testing checklist:**\n- [ ] Manifest passes dry-run validation\n- [ ] All required fields are present\n- [ ] Resource limits are reasonable\n- [ ] Health checks are configured\n- [ ] Security context is set\n- [ ] Labels follow conventions\n- [ ] Namespace exists or is created\n\n## Common Patterns\n\n### Pattern 1: Simple Stateless Web Application\n\n**Use case:** Standard web API or microservice\n\n**Components needed:**\n- Deployment (3 replicas for HA)\n- ClusterIP Service\n- ConfigMap for configuration\n- Secret for API keys\n- HorizontalPodAutoscaler (optional)\n\n**Reference:** See `assets\u002Fdeployment-template.yaml`\n\n### Pattern 2: Stateful Database Application\n\n**Use case:** Database or persistent storage application\n\n**Components needed:**\n- StatefulSet (not Deployment)\n- Headless Service\n- PersistentVolumeClaim template\n- ConfigMap for DB configuration\n- Secret for credentials\n\n### Pattern 3: Background Job or Cron\n\n**Use case:** Scheduled tasks or batch processing\n\n**Components needed:**\n- CronJob or Job\n- ConfigMap for job parameters\n- Secret for credentials\n- ServiceAccount with RBAC\n\n### Pattern 4: Multi-Container Pod\n\n**Use case:** Application with sidecar containers\n\n**Components needed:**\n- Deployment with multiple containers\n- Shared volumes between containers\n- Init containers for setup\n- Service (if needed)\n\n## Templates\n\nThe following templates are available in the `assets\u002F` directory:\n\n- `deployment-template.yaml` - Standard deployment with best practices\n- `service-template.yaml` - Service configurations (ClusterIP, LoadBalancer, NodePort)\n- `configmap-template.yaml` - ConfigMap examples with different data types\n- `secret-template.yaml` - Secret examples (to be generated, not committed)\n- `pvc-template.yaml` - PersistentVolumeClaim templates\n\n## Reference Documentation\n\n- `references\u002Fdeployment-spec.md` - Detailed Deployment specification\n- `references\u002Fservice-spec.md` - Service types and networking details\n\n## Best Practices Summary\n\n1. **Always set resource requests and limits** - Prevents resource starvation\n2. **Implement health checks** - Ensures Kubernetes can manage your application\n3. **Use specific image tags** - Avoid unpredictable deployments\n4. **Apply security contexts** - Run as non-root, drop capabilities\n5. **Use ConfigMaps and Secrets** - Separate config from code\n6. **Label everything** - Enables filtering and organization\n7. **Follow naming conventions** - Use standard Kubernetes labels\n8. **Validate before applying** - Use dry-run and validation tools\n9. **Version your manifests** - Keep in Git with version control\n10. **Document with annotations** - Add context for other developers\n\n## Troubleshooting\n\n**Pods not starting:**\n- Check image pull errors: `kubectl describe pod \u003Cpod-name>`\n- Verify resource availability: `kubectl get nodes`\n- Check events: `kubectl get events --sort-by='.lastTimestamp'`\n\n**Service not accessible:**\n- Verify selector matches pod labels: `kubectl get endpoints \u003Cservice-name>`\n- Check service type and port configuration\n- Test from within cluster: `kubectl run debug --rm -it --image=busybox -- sh`\n\n**ConfigMap\u002FSecret not loading:**\n- Verify names match in Deployment\n- Check namespace\n- Ensure resources exist: `kubectl get configmap,secret`\n\n## Next Steps\n\nAfter creating manifests:\n1. Store in Git repository\n2. Set up CI\u002FCD pipeline for deployment\n3. Consider using Helm or Kustomize for templating\n4. Implement GitOps with ArgoCD or Flux\n5. Add monitoring and observability\n\n## Related Skills\n\n- `helm-chart-scaffolding` - For templating and packaging\n- `gitops-workflow` - For automated deployments\n- `k8s-security-policies` - For advanced security configurations\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fwshobson\u002Fk8s-manifest-generator",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill k8s-manifest-generator",{"tool":57,"command":58},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill k8s-manifest-generator",{"tool":60,"command":61},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill k8s-manifest-generator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fwshobson\u002Fk8s-manifest-generator\u002FSKILL.md",true,[65,71,75,79,85,89],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"assets\u002Fconfigmap-template.yaml","ASSET","资产文件",6222,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fwshobson\u002Fk8s-manifest-generator\u002Fassets\u002Fconfigmap-template.yaml",{"path":72,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":73,"sourceHtmlUrl":74},"assets\u002Fdeployment-template.yaml",5226,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fwshobson\u002Fk8s-manifest-generator\u002Fassets\u002Fdeployment-template.yaml",{"path":76,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":77,"sourceHtmlUrl":78},"assets\u002Fservice-template.yaml",3711,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fwshobson\u002Fk8s-manifest-generator\u002Fassets\u002Fservice-template.yaml",{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Fdeployment-spec.md","REFERENCE","参考文档",17067,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fwshobson\u002Fk8s-manifest-generator\u002Freferences\u002Fdeployment-spec.md",{"path":86,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fservice-spec.md",13629,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fwshobson\u002Fk8s-manifest-generator\u002Freferences\u002Fservice-spec.md",{"path":90,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":91,"sourceHtmlUrl":92},"skill-report.json",9225,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fwshobson\u002Fk8s-manifest-generator\u002Fskill-report.json",[94,103,112,121,127,133],{"skillNo":95,"name":96,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":37},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[100,101,102],"model","model hierarchy","model hierarchy skill",{"skillNo":104,"name":105,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":37},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[109,110,111],"MCP","zoom","zoom mcp",{"skillNo":113,"name":114,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":37},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[118,119,120,110],"sdk","zoom apps sdk","apps",{"skillNo":122,"name":123,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":37},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[123],{"skillNo":128,"name":129,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":37},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[129],{"skillNo":134,"name":135,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":37},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[135]]