replica-omnisciente/docs/guides/cli/helm.md

77 lines
2.6 KiB
Markdown

# helm (Helm CLI)
## What it is
Helm is the package manager for Kubernetes: charts bundle manifests, and
`helm install/upgrade/rollback` manages releases against the cluster your
kubeconfig points at.
## Install
Official install script (latest stable, detects arch):
```bash
curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
```
Or the static binary: download `helm-<version>-linux-amd64.tar.gz` (or
`-linux-arm64`) from the [releases page](https://github.com/helm/helm/releases)
and move `linux-amd64/helm` to `/usr/local/bin`. Pin a version from the
releases page when you need identical clients across machines.
## Authenticate
No separate auth — Helm reuses your kubeconfig (`~/.kube/config`, see
[kubectl.md](kubectl.md)). Chart repos with private registries authenticate
via:
```bash
helm repo add <name> https://charts.example.com --username <u> --password <p>
```
Store repo credentials in Vaultwarden (https://vault.portugalfuturista.org).
## Configure for this environment
```bash
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm search repo bitnami | head
```
Point it at the self-hosted k3s cluster by setting `KUBECONFIG` (see
kubectl.md). Values overrides for LAN endpoints (MinIO etc.) go in a local
`values-lab.yaml` kept out of git.
## Self-hosted equivalent
Helm itself is infrastructure-neutral — the self-hosted part is the cluster it
targets (**k3s** on Proxmox, see kubectl.md) and, if you outgrow public chart
repos, a self-hosted **ChartMuseum** (which can store charts on MinIO at
`http://192.168.0.40:9000`). OCI registries (e.g. `helm push ... oci://...`)
are another option once a registry is deployed.
## Aurélio integration
The **cli-devops** skill drives `helm` for release management alongside
`kubectl`. Connector registry id: `kubernetes` (same cluster connector).
## Verify
```bash
helm version
# version.BuildInfo{Version:"v3.x.y", ...}
helm list --all-namespaces # against a configured cluster
# NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
```
## Troubleshooting
- **`Error: Kubernetes cluster unreachable`** — kubeconfig/context problem;
fix with `kubectl` first, Helm inherits it.
- **Chart not found after `helm repo add`** — run `helm repo update`.
- **Upgrade fails with "another operation in progress"** — a release is stuck
`pending-*`; `helm history <rel>` then `helm rollback <rel>`.
- **CRDs missing** — some charts (e.g. cert-manager) need CRDs installed first
(`helm install --set crds.enabled=true` or a separate CRD step); read the
chart's README.