helm-charts – skill DevOps & Hạ tầng cho agent AI
Tạo, quản lý và triển khai Helm chart để quản lý gói Kubernetes.
Cài skill helm-charts bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/helm-charts-749f4.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /helm-charts – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/helm-charts-749f4.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $helm-charts – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/helm-charts-749f4.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /helm-charts – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/helm-charts-749f4.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /helm-charts – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Helm Charts
Package and deploy Kubernetes applications using Helm, the package manager for Kubernetes.
When to Use This Skill
Use this skill when:
- Creating reusable Kubernetes application packages
- Deploying applications with configurable values
- Managing Helm releases and upgrades
- Using third-party Helm charts
- Implementing chart versioning and repositories
Prerequisites
- Helm 3.x installed
- kubectl configured with cluster access
- Basic Kubernetes knowledge
Release and template scope
Confirm cluster/context/namespace/release and exact chart/dependency versions before writes. These snippets omit Service/Secret/application files and are not a complete deployable chart; supply referenced assets and review rendered output. Helm hooks/tests execute containers and can run migrations; rollback/uninstall cannot undo database/external effects automatically. Dry-run/debug/template/get-values output may expose secrets. Use protected secret references, reviewed charts/images and valid version constraints/Chart.lock; render/lint/schema-check before an authorized staged rollout and verify readiness beyond successful release metadata.
Chart Structure
mychart/
├── Chart.yaml # Chart metadata
├── values.yaml # Default configuration values
├── charts/ # Chart dependencies
├── templates/ # Kubernetes manifest templates
│ ├── deployment.yaml
│ ├── service.yaml
│ ├── ingress.yaml
│ ├── configmap.yaml
│ ├── secret.yaml
│ ├── _helpers.tpl # Template helpers
│ ├── NOTES.txt # Post-install notes
│ └── tests/
│ └── test-connection.yaml
└── .helmignore # Files to ignoreChart.yaml
apiVersion: v2
name: myapp
description: A Helm chart for MyApp
type: application
version: 1.0.0
appVersion: "2.0.0"
keywords:
- myapp
- web
maintainers:
- name: DevOps Team
email: [email protected]
dependencies:
- name: postgresql
version: "12.x.x"
repository: "https://charts.bitnami.com/bitnami"
condition: postgresql.enabledvalues.yaml
replicaCount: 2
image:
repository: myapp
tag: "" # Defaults to appVersion
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 80
ingress:
enabled: false
className: nginx
hosts:
- host: myapp.example.com
paths:
- path: /
pathType: Prefix
tls: []
resources:
limits:
cpu: 500m
memory: 256Mi
requests:
cpu: 100m
memory: 128Mi
postgresql:
enabled: true
auth:
database: myappTemplates
Deployment Template
# templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "myapp.fullname" . }}
labels:
{{- include "myapp.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "myapp.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "myapp.selectorLabels" . | nindent 8 }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 8080
{{- with .Values.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: {{ include "myapp.fullname" . }}-secrets
key: database-urlHelper Functions
# templates/_helpers.tpl
{{/*
Expand the name of the chart.
*/}}
{{- define "myapp.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
*/}}
{{- define "myapp.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "myapp.labels" -}}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
{{ include "myapp.selectorLabels" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "myapp.selectorLabels" -}}
app.kubernetes.io/name: {{ include "myapp.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}Conditional Resources
# templates/ingress.yaml
{{- if .Values.ingress.enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "myapp.fullname" . }}
labels:
{{- include "myapp.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.ingress.className }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
pathType: {{ .pathType }}
backend:
service:
name: {{ include "myapp.fullname" $ }}
port:
number: {{ $.Values.service.port }}
{{- end }}
{{- end }}
{{- end }}Helm Commands
Installing Charts
# Install from local chart
helm install myapp ./mychart
# Install with custom values
helm install myapp ./mychart -f custom-values.yaml
# Install with value overrides
helm install myapp ./mychart \
--set replicaCount=3 \
--set image.tag=2.0.0
# Install in specific namespace
helm install myapp ./mychart -n production --create-namespace
# Dry run to preview
helm install myapp ./mychart --dry-run --debugManaging Releases
# List releases
helm list
helm list -A # All namespaces
# Upgrade release
helm upgrade myapp ./mychart
helm upgrade myapp ./mychart -f new-values.yaml
# Rollback
helm rollback myapp 1
helm history myapp
# Uninstall
helm uninstall myappChart Development
# Create new chart
helm create mychart
# Lint chart
helm lint ./mychart
# Template locally (debug)
helm template myapp ./mychart
# Package chart
helm package ./mychart
# Update dependencies
helm dependency update ./mychartRepositories
# Add repository
helm repo add bitnami https://charts.bitnami.com/bitnami
# Update repositories
helm repo update
# Search charts
helm search repo postgresql
helm search hub prometheus
# Install from repo
helm install postgres bitnami/postgresql
# Show chart info
helm show values bitnami/postgresqlAdvanced Features
Hooks
# templates/pre-install-job.yaml
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "myapp.fullname" . }}-migration
annotations:
"helm.sh/hook": pre-install,pre-upgrade
"helm.sh/hook-weight": "-5"
"helm.sh/hook-delete-policy": hook-succeeded
spec:
template:
spec:
containers:
- name: migrate
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
command: ["./migrate.sh"]
restartPolicy: NeverTests
# templates/tests/test-connection.yaml
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "myapp.fullname" . }}-test-connection"
annotations:
"helm.sh/hook": test
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "myapp.fullname" . }}:{{ .Values.service.port }}']
restartPolicy: Never# Run tests
helm test myappLibrary Charts
# Chart.yaml
apiVersion: v2
name: mylib
type: library
version: 1.0.0# Using library chart
dependencies:
- name: mylib
version: "1.x.x"
repository: "file://../mylib"OCI Registry Support
# Login to registry
helm registry login registry.example.com
# Push chart to OCI registry
helm push mychart-1.0.0.tgz oci://registry.example.com/charts
# Pull from OCI registry
helm pull oci://registry.example.com/charts/mychart --version 1.0.0
# Install from OCI
helm install myapp oci://registry.example.com/charts/mychartCommon Issues
Issue: YAML Indentation Errors
Problem: Template renders with wrong indentation
Solution: Use nindent helper function
{{- toYaml .Values.resources | nindent 12 }}Issue: Values Not Applying
Problem: Custom values not reflected
Solution: Check value paths, use --debug flag
helm template myapp ./mychart --debugIssue: Dependency Errors
Problem: Char
… (nội dung đầy đủ có trong gói tải về)
Skill liên quan
- hf-cloud-aws-context-discovery – Xác định profile, region, tài khoản và danh tính AWS cục bộ đang hiệu lực trước mọi tác…
- slo-architect – Dùng khi định nghĩa, xem xét hoặc vận hành SLO/SLI/error budget. Kích hoạt với các câu…
- slo-architect – Dùng khi định nghĩa, xem xét hoặc vận hành SLO/SLI/error budget. Kích hoạt với các câu…
- hugging-face-model-trainer – Huấn luyện hoặc fine-tune mô hình ngôn ngữ và thị giác bằng TRL (Transformer…
- huggingface-spaces – Xây dựng, triển khai và bảo trì ứng dụng trên Hugging Face Spaces — SDK Gradio / Docker…
- hunt-cloud-misconfig – Tìm cấu hình sai trên cloud / hạ tầng.
- hunt-k8s – Tìm lỗ hổng Kubernetes & Docker
- hybrid-cloud-architect – Kiến trúc sư hybrid cloud chuyên về các giải pháp multi-cloud phức tạp trên…