用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill kubernetes-helm命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | kubernetes-helm |
| description | > Use when this capability is needed. |
"Declare the desired state. Let the cluster figure out the rest."
Invoked when deploying containerized applications to Kubernetes. Generates production-grade manifests or Helm charts with best practices baked in.
Steps:
Deployment (or StatefulSet for stateful apps).Service (ClusterIP, LoadBalancer, or NodePort).Ingress (with TLS termination).ConfigMap and Secret for configuration.HorizontalPodAutoscaler (HPA).PodDisruptionBudget for high-availability deployments.Steps:
chart/
├── Chart.yaml
├── values.yaml
├── templates/
│ ├── deployment.yaml
│ ├── service.yaml
│ ├── ingress.yaml
│ ├── configmap.yaml
│ ├── secret.yaml
│ ├── hpa.yaml
│ └── _helpers.tpl
└── .helmignore
values.yaml (image, replicas, resources,
env vars, ingress host).{{ include }} helpers for labels and selectors.Steps:
NetworkPolicy to restrict pod-to-pod traffic.securityContext:
runAsNonRoot: truereadOnlyRootFilesystem: trueallowPrivilegeEscalation: falseServiceAccount with minimal RBAC.kubesec or kube-linter.Steps:
maxUnavailable: 0 (zero downtime).maxSurge: 25%.helm rollback <release> <revision>.| Field | Type | Description |
|---|---|---|
manifests | string[] | Generated K8s YAML files |
helm_chart | string | Helm chart directory path |
values | string | Default values.yaml |
values.yaml and _helpers.tpl.terraform-iac.docker-containerization.Secret resources or external secrets operators.resources.requests and resources.limits on every container — never leave them empty.runAsNonRoot: true and readOnlyRootFilesystem: true unless the user explicitly opts out.kubectl --dry-run=client or helm template before presenting output.replicas below 2 for production workloads without explicit user approval.hostNetwork: true, privileged: true, or hostPID: true unless the user explicitly requests it and confirms the security implications.<path>?"| Situation | Action |
|---|---|
| Stateless HTTP service | Use Deployment + HPA with rolling update strategy |
| Database or message queue | Use StatefulSet with volumeClaimTemplates |
| Log collector or node agent | Use DaemonSet |
| Single environment, no parameterization needed | Generate plain YAML manifests |
| Multi-environment or reuse required | Scaffold a Helm chart with values.yaml per env |
| Fewer than 3 microservices | Individual manifests per service |
| 3+ microservices with shared config | Helm umbrella chart with subcharts |
| Service needs zero-downtime deploys | Set maxUnavailable: 0, add PodDisruptionBudget |
| External traffic required | Add Ingress with TLS; annotate for cert-manager |
kubectl apply --dry-run=client without errors.helm template renders the chart without warnings or unresolved values.resources.requests and resources.limits defined.values.yaml.| Failure | Symptom | Mitigation |
|---|---|---|
| Missing resource limits | Pod gets OOMKilled or starves other workloads | Always set CPU/memory requests and limits; validate with kube-linter |
| No health probes | Failed pods stay in Running state, receive traffic | Add liveness + readiness probes matching actual health endpoints |
| Hardcoded secrets | Credentials exposed in version control | Use Secret resources with stringData; flag for external secrets operator |
Image tag set to latest | Non-deterministic deployments, rollback fails | Pin image tags to digest or semver; warn if latest detected |
Missing PodDisruptionBudget | Cluster upgrades or node drains cause downtime | Add PDB with minAvailable for production workloads |
| Helm values not parameterized | Chart works only for one environment | Ensure all environment-specific values flow through values.yaml |
| RBAC too permissive | Service account has cluster-admin privileges | Scope roles to minimum verbs and resources; use Role over ClusterRole |
[{timestamp}] Skill invoked — mode: {manifest|helm}, target namespace: {namespace}, environment: {env}.[{timestamp}] Resources generated: {resource_list} (e.g., Deployment, Service, Ingress, HPA).[{timestamp}] Helm chart scaffolded at {chart_path} — templates: {template_count}, values keys: {key_count}.[{timestamp}] Security scan result: {pass|fail} — issues: {issue_list}.[{timestamp}] Dry-run validation: {pass|fail} — errors: {error_count}.[{timestamp}] Files written: {file_paths}, total size: {bytes} bytes.Source: dhruvinrsoni/agentskills-garden — distributed by TomeVault.