هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.
ماذا يفعل
A chart is a folder of YAML templates plus values.yaml with default settings. helm install renders the templates with your values and creates a release in the cluster. Helm keeps the history of every release, so helm rollback returns to an old version. Charts come from repositories (HTTP) or OCI registries (oci://ghcr.io/…).
Most cluster add-ons are installed with Helm: ingress-nginx, cert-manager, kube-prometheus-stack, Argo CD, Vault, Falco.
طريقة الكتابة
helm install|upgrade RELEASE CHART [-n NS] [-f values.yaml] [--set k=v]
helm repo add NAME URLالأجزاء الرئيسية
Commands
repoadd/update/list- Manage chart repositories.
searchrepo|hubWORD- Find charts.
showvaluesCHART- Show the default values.
installRELEASECHART- Install a chart.
upgrade[--install]RELEASECHART- Upgrade (or install).
list[-A]- List releases.
statusRELEASE- Show release status and notes.
historyRELEASE- Revisions of a release.
rollbackRELEASE[REV]- Go back to an old revision.
uninstallRELEASE- Remove a release.
templateRELEASECHART- Render YAML locally, install nothing.
getvalues|manifestRELEASE- Show what was installed.
createNAME- Make a new chart skeleton.
lintDIR- Check a chart for errors.
packageDIR/pushFILEoci://…- Build and publish a chart.
pullCHART[--untar]- Download a chart.
dependencyupdate- Download sub-charts.
الخيارات 8
الأكثر استخدامًا
Common flags
لا يوجد شيء يطابق هذا الفلتر.
أمثلة 10
$ مستخدم عادي# بصلاحية root (أو مع sudo)
1Add a repository and find a chart
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx helm repo update helm search repo ingress-nginx2Read the defaults and write your own values
helm show values ingress-nginx/ingress-nginx > values-default.yaml cat values-ingress.yaml controller: replicaCount: 2 service: type: LoadBalancer3Install into its own namespace
helm install ingress ingress-nginx/ingress-nginx -n ingress-nginx --create-namespace -f values-ingress.yaml --version 4.11.34Upgrade safely, with automatic rollback
helm upgrade --install ingress ingress-nginx/ingress-nginx -n ingress-nginx -f values-ingress.yaml --atomic --wait --timeout 5m5See history and roll back
helm history ingress -n ingress-nginx helm rollback ingress 2 -n ingress-nginx6Render YAML to review or scan
helm template shop ./charts/shop -f values-prod.yaml > rendered.yaml trivy config rendered.yaml7Install the monitoring stack
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm install monitoring prometheus-community/kube-prometheus-stack -n monitoring --create-namespace8Use a chart from an OCI registry
helm install argocd oci://ghcr.io/argoproj/argo-helm/argo-cd -n argocd --create-namespace9Make, check and publish your own chart
helm create shop helm lint ./shop helm package ./shop helm push shop-0.1.0.tgz oci://ghcr.io/s0sta/charts10See what a release changed
helm get values ingress -n ingress-nginx helm get manifest ingress -n ingress-nginx | less
لا يوجد شيء يطابق هذا الفلتر.
انتبه
- Pin
--version; without it you get whatever is newest that day. - Do not put secrets in
values.yamlin Git; use External Secrets, SOPS or sealed secrets. - Helm stores releases as Secrets in the namespace — RBAC there matters.
الملفات
~/.config/helm/repositories.yaml- Added repositories.
~/.cache/helm/- Downloaded charts.
Chart.yaml, values.yaml, templates/- Parts of a chart.
نصائح للحفظ
- In GitOps, Argo CD or Flux renders the chart for you; keep only values files in Git.
رموز الخروج
0 | Success. |
1 | Error. |