[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BWGEMCPACGSC0FEVACMDR6":3,"skill-same:01M7BWGEMCPACGSC0FEVACMDR6":71},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7BWGEMCPACGSC0FEVACMDR6","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.","YYC-Cube\u002FYYC3-Knowledge-Base","YYC-Cube","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F235006543?v=4","01M79J2PH4SWD2X0825X6PN748","yyc3","01M79J2PHVK3F6ZBYT8K2SCZCW",1,"MIT","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Plugin-插件协议\u002FYYC3-Plugin-插件协议-plugins-claude\u002Fkubernetes-operations\u002Fskills\u002Fk8s-manifest-generator\u002FSKILL.md",[],[],"2026-11-15 14:19:17",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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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:\n\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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:\n\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","87afe6ce96220accf50a345dea46784c8c9f210e","YYC3-Plugin-插件协议\u002FYYC3-Plugin-插件协议-plugins-claude\u002Fkubernetes-operations\u002Fskills\u002Fk8s-manifest-generator",0,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base","https:\u002F\u002Fkb.yyc3.top\u002F","https:\u002F\u002Fgithub.com\u002FYYC-Cube","万象归元于云枢 | 深栈智启新纪元","2026-11-10 10:37:32",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill k8s-manifest-generator",{"tool":39,"command":40},"bunx","bunx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill k8s-manifest-generator",{"tool":42,"command":43},"pnpm","pnpm dlx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill k8s-manifest-generator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Plugin-插件协议\u002FYYC3-Plugin-插件协议-plugins-claude\u002Fkubernetes-operations\u002Fskills\u002Fk8s-manifest-generator\u002FSKILL.md",true,[47,53,57,61,67],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"assets\u002Fconfigmap-template.yaml","ASSET","资产文件",6222,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Plugin-插件协议\u002FYYC3-Plugin-插件协议-plugins-claude\u002Fkubernetes-operations\u002Fskills\u002Fk8s-manifest-generator\u002Fassets\u002Fconfigmap-template.yaml",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"assets\u002Fdeployment-template.yaml",5226,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Plugin-插件协议\u002FYYC3-Plugin-插件协议-plugins-claude\u002Fkubernetes-operations\u002Fskills\u002Fk8s-manifest-generator\u002Fassets\u002Fdeployment-template.yaml",{"path":58,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":59,"sourceHtmlUrl":60},"assets\u002Fservice-template.yaml",3711,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Plugin-插件协议\u002FYYC3-Plugin-插件协议-plugins-claude\u002Fkubernetes-operations\u002Fskills\u002Fk8s-manifest-generator\u002Fassets\u002Fservice-template.yaml",{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fdeployment-spec.md","REFERENCE","参考文档",17698,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Plugin-插件协议\u002FYYC3-Plugin-插件协议-plugins-claude\u002Fkubernetes-operations\u002Fskills\u002Fk8s-manifest-generator\u002Freferences\u002Fdeployment-spec.md",{"path":68,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fservice-spec.md",13887,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Plugin-插件协议\u002FYYC3-Plugin-插件协议-plugins-claude\u002Fkubernetes-operations\u002Fskills\u002Fk8s-manifest-generator\u002Freferences\u002Fservice-spec.md",[72,79,86,93,100,107],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7CTDWHERCXPQCP0K03A86AS","vercel-sandbox","Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include \"Vercel Sandbox browser\", \"microVM Chrome\", \"agent-browser in sandbox\", \"browser automation on Vercel\", or any task requiring Chrome in a Vercel Sandbox.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fvercel-sandbox\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7CTD8D2BNJY54S65M47HEJA","slack","Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include \"check my Slack\", \"what channels have unreads\", \"send a message to\", \"search Slack for\", \"extract from Slack\", \"find who said\", or any task requiring programmatic Slack interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fslack\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7CTCSSB8ZP3Q58C3YZDZK1W","electron","Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include \"automate Slack app\", \"control VS Code\", \"interact with Discord app\", \"test this Electron app\", \"connect to desktop app\", or any task requiring automation of a native Electron application.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Felectron\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"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":19},"01M7CTCBJY76688V4DCZGWFHGQ","dogfood","Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to \"dogfood\", \"QA\", \"exploratory test\", \"find issues\", \"bug hunt\", \"test this app\u002Fsite\u002Fplatform\", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fdogfood\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":19},"01M7CTC4H0FFGVEAQR9PA4GA1A","agent-browser","Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to \"open a website\", \"fill out a form\", \"click a button\", \"take a screenshot\", \"scrape data from a page\", \"test this web app\", \"login to a site\", \"automate browser actions\", or any task requiring programmatic web interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fagent-browser\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":19},"01M7CTBKVFYBG78FDSABSDJTTQ","shadcn","Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn\u002Fui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for \"shadcn init\", \"create an app with --preset\", \"switch to --preset\", and for building a design system or applying a DESIGN.md or brand spec to shadcn\u002Fui.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-UI-界面组件\u002FYYC3-UI-界面组件-ui\u002Fskills\u002Fshadcn\u002FSKILL.md",[],[]]