# [[Helm for Kubernetes]] ![[Helm for Kubernetes.svg]] Helm is a [[Package Manager]] for [[Kubernetes]]. ## How to install Helm On macOS: ```bash brew install helm` ``` You can also use the Helm installer script to fetch the latest Helm version and install it locally: ``` bash $ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 $ chmod 700 get_helm.sh $ ./get_helm.sh ``` On [[Debian]]/[[Ubuntu]] using [[Apt]]: ```console curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null sudo apt-get install apt-transport-https --yes echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list sudo apt-get update sudo apt-get install helm ``` Other ways to install Helm can be found in [the Helm documentation](https://helm.sh/docs/intro/install/). ## Helm charts A Helm chart is a group of manifest files for Kubernetes that can be installed with a single command. This installation is an alternative to creating and maintaining your own manifests or manually copying several manifests. Helm charts also bring templating to Kubernetes, so that manifests can be re-used for different, but similar, components. Helm charts are kept as repositories on [[GitHub]]. ## How to install apps using Helm ### Add a Helm chart repository You can add a Helm chart repo with this command: ``` helm repo add prometheus-community https://prometheus-community.github.io/helm-charts ``` The command above is for [[Prometheus]]. Replace `prometheus-community` with the name you want to assign your chart and the URL with the URL of the Helm chart repo you want to install. ### Install app within Helm chart A Helm chart can have several manifests for different apps. Here's how to install a particular one from the Helm chart: ```bash helm install prometheus prometheus-community/prometheus ``` You can also use flags to pass in, for example, a values.yaml: ```bash helm install -f values.yaml grafana grafana/grafana ``` You can also deploy the config within a namespace like this: ```bash helm install --values values.yaml loki grafana/loki -n loki --create-namespace ``` ## How to create a values.yaml from Helm-installed app ```bash helm show values prometheus-community/prometheus-postgres-exporter > pg-values.yaml ``` That's ```bash helm show values helm_chart_repo/chart > name_of_values_file.yaml ``` ## Get a list of all releases ```bash helm list ``` ## Other usage ### Search a repo ```bash helm search repo grafana ``` This command shows all the installable components in this repo. ### Uninstall a component You can uninstall a component or app by running this command: ```bash helm uninstall releasename ``` ### Upgrade Helm chart Upgrade Helm chart after `values.yaml` has been updated and redeploy: ```bash helm upgrade loki grafana/loki -f values.yaml -n loki ``` ## Alternatives to Helm - [[Kustomize]] is a configuration customisation tool built into [[kubectl]]. - [[Jsonnet]] + [[Grafana Tanka]] or [[Kubecfg]]: Jsonnet is a data templating language (like [[JSON]] + logic). It's the foundation for Tanka, a powerful deployment tool. - [[Kpt]] is a [[GitOps]]-friendly tool by Google built on top of [[Kubernetes Resource Module]]. - [[Pulumi]] - [[Hashicorp Terraform|Terraform]] - [[Ansible]] with Kubernetes modules adds k8s support to Ansible playbooks - [[Fleet]] by [[Rancher Labs]] is a [[GitOps]]-friendly infrastructure tool ## Related - [[Deploying Loki on GCP GKE via Helm]] is a guide for how to use Helm to deploy Loki on [[Google Cloud Platform|GCP]] [[Google Kubernetes Engine|GKE]] using [[Google Cloud Storage|GCS]] as an [[Object storage]] - [[Deploying Loki on AWS]] is a guide for how to use Helm to deploy [[Grafana Loki|Loki]] on [[AWS]] %% # Excalidraw Data ## Text Elements ## Drawing ```json { "type": "excalidraw", "version": 2, "source": "https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/2.1.4", "elements": [ { "id": "4y8R7iOA", "type": "text", "x": 118.49495565891266, "y": -333.44393157958984, "width": 3.8599853515625, "height": 24, "angle": 0, "strokeColor": "#1e1e1e", "backgroundColor": "transparent", "fillStyle": "solid", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 1, "opacity": 100, "groupIds": [], "frameId": null, "roundness": null, "seed": 967149026, "version": 2, "versionNonce": 939059582, "isDeleted": true, "boundElements": null, "updated": 1713723615080, "link": null, "locked": false, "text": "", "rawText": "", "fontSize": 20, "fontFamily": 4, "textAlign": "left", "verticalAlign": "top", "containerId": null, "originalText": "", "lineHeight": 1.2 } ], "appState": { "theme": "dark", "viewBackgroundColor": "#ffffff", "currentItemStrokeColor": "#1e1e1e", "currentItemBackgroundColor": "transparent", "currentItemFillStyle": "solid", "currentItemStrokeWidth": 2, "currentItemStrokeStyle": "solid", "currentItemRoughness": 1, "currentItemOpacity": 100, "currentItemFontFamily": 4, "currentItemFontSize": 20, "currentItemTextAlign": "left", "currentItemStartArrowhead": null, "currentItemEndArrowhead": "arrow", "scrollX": 583.2388916015625, "scrollY": 573.6323852539062, "zoom": { "value": 1 }, "currentItemRoundness": "round", "gridSize": null, "gridColor": { "Bold": "#C9C9C9FF", "Regular": "#EDEDEDFF" }, "currentStrokeOptions": null, "previousGridSize": null, "frameRendering": { "enabled": true, "clip": true, "name": true, "outline": true } }, "files": {} } ``` %%