هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.
$ مستخدم عادي# بصلاحية root (أو مع sudo)
The quick answer
helm repo add podinfo https://stefanprodan.github.io/podinfo
helm repo update
helm search repo podinfo/podinfo --versions | head -3
helm show values podinfo/podinfo --version CHART_VERSION > values-web.yaml
helm upgrade --install web podinfo/podinfo -n web --create-namespace --version CHART_VERSION -f values-web.yaml --wait
helm list -n webCHART_VERSION = the version you chose from helm search repo --versions. Always pin it.
Step by step
- Find the chart and read it (versions, default values, README):
helm search repo podinfo --versions | head -5
helm show chart podinfo/podinfo --version CHART_VERSION
helm show readme podinfo/podinfo --version CHART_VERSION | less- Write only what you change into your values file (keep it short — the rest are the chart defaults):
replicaCount: 2
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
memory: 128Mi
ingress:
enabled: true
className: nginx
hosts:
- host: web.example.com
paths:
- path: /
pathType: Prefix- Preview before you install — render the YAML and let the API server check it:
helm template web podinfo/podinfo -n web --version CHART_VERSION -f values-web.yaml | less
helm upgrade --install web podinfo/podinfo -n web --create-namespace --version CHART_VERSION -f values-web.yaml --dry-run=server- Install (or upgrade) with one command — the same command works the first time and every time after:
helm upgrade --install web podinfo/podinfo -n web --create-namespace --version CHART_VERSION -f values-web.yaml --wait --timeout 5m
kubectl get pods,svc,ingress -n web--wait waits until the Pods are ready; without it Helm says "deployed" even if the Pods crash.
- Daily commands:
| Command | Does |
|---|---|
helm list -A | All releases in all namespaces. |
helm get values web -n web | The values you gave (-a = all values). |
helm history web -n web | All revisions of the release. |
helm rollback web 3 -n web | Back to revision 3. |
helm uninstall web -n web | Remove the app (PVCs often stay). |
- Charts from an OCI registry (no
repo add):
helm install cache oci://registry.example.com/charts/redis --version 1.2.0 -n cache --create-namespace- At work: keep
values-*.yamlin Git and let Argo CD or Flux install the chart (aHelmReleaseor an Argo CD Application) instead of running Helm by hand.
Check that it worked
Common problems
| Problem | Cause | Fix |
|---|---|---|
cannot re-use a name that is still in use | A release with that name exists. | Use helm upgrade --install, or another name. |
another operation (install/upgrade/rollback) is in progress | A failed or stopped Helm run left the release "pending". | helm history; then helm rollback NAME LAST_GOOD. |
| "deployed", but the Pods crash | No --wait; Helm only applied the YAML. | Use --wait; check with kubectl describe pod. |
| Your value has no effect | Wrong key (typo or wrong level). | Compare with helm show values; helm template and look. |
| A new chart version broke the app | Not pinned — repo update took the newest. | Always --version; read the chart's upgrade notes. |
rendered manifests contain a resource that already exists | The object was made by hand or by another release. | Delete it, or adopt it with Helm labels/annotations (carefully). |
Go further
- Command pages: helm, kubectl.
- Next how-tos: Roll back a deployment, Port-forward to a service, Scale a deployment, Use Kustomize overlays.
- Learn it: CKA — Helm install, CKA — Helm upgrade and rollback, GitOps — Helm in a GitOps repo, Flux HelmRelease.
- Full guides: Install Helm, Argo CD, Flux. At work: helm in daily use.
1Why use helm upgrade --install instead of helm install?
The same command works for the first install and every update — good for scripts and CI.
2Why always pass --version?
Without it Helm takes the newest chart version, which can change the app without warning.