### Install Dependencies and Start Development Server Source: https://github.com/helm/helm-www/blob/main/AGENTS.md Installs project dependencies and starts the local development server for the Helm website. ```bash # Install dependencies yarn install # Start development server yarn start ``` -------------------------------- ### Example of Verifying an Installed Plugin Source: https://github.com/helm/helm-www/blob/main/docs/helm/helm_plugin_verify.md This example shows how to verify an installed Helm plugin located in the default plugins directory. Replace 'example-cli' with the actual name of your plugin. ```bash helm plugin verify ~/.local/share/helm/plugins/example-cli ``` -------------------------------- ### Example Plugin with Platform Commands and Hooks Source: https://github.com/helm/helm-www/blob/main/docs/topics/plugins.mdx An example Helm plugin configuration demonstrating platform-specific commands for different operating systems and platform-specific hooks for install and update events. ```yaml name: myplugin version: 0.1.0 usage: example plugin description: example plugin ignoreFlags: false platformCommand: - command: ${HELM_PLUGIN_DIR}/bin/myplugin - os: windows command: ${HELM_PLUGIN_DIR}\bin\myplugin.exe platformHooks: install: - command: ${HELM_PLUGIN_DIR}/scripts/install.sh - os: windows command: pwsh args: - -c - ${HELM_PLUGIN_DIR}\scripts\install.ps1 update: - command: ${HELM_PLUGIN_DIR}/scripts/install.sh args: - -u - os: windows command: pwsh args: - -c - ${HELM_PLUGIN_DIR}\scripts\install.ps1 - -Update ``` -------------------------------- ### Helm Chart Usage Instructions Source: https://github.com/helm/helm-www/blob/main/docs/howto/chart_releaser_action.md Example README.md content for users to add and update Helm repositories and install charts. ```markdown ## Usage [Helm](https://helm.sh) must be installed to use the charts. Please refer to Helm's [documentation](https://helm.sh/docs) to get started. Once Helm has been set up correctly, add the repo as follows: helm repo add https://.github.io/helm-charts If you had already added this repo earlier, run `helm repo update` to retrieve the latest versions of the packages. You can then run `helm search repo ` to see the charts. To install the chart: helm install my- / To uninstall the chart: helm uninstall my- ``` -------------------------------- ### Helm SDK Driver Example Source: https://github.com/helm/helm-www/blob/main/docs/sdk/examples.mdx Demonstrates the necessary auxiliary functions for Helm SDK actions and shows them in action: pulling, installing, updating, and uninstalling a chart from an OCI repository. ```go package main import ( "fmt" "os" "helm.sh/helm/v3/pkg/action" "helm.sh/helm/v3/pkg/chart/loader" "helm.sh/helm/v3/pkg/cli" "helm.sh/helm/v3/pkg/getter" ``` -------------------------------- ### Install Dependencies Source: https://github.com/helm/helm-www/blob/main/community/localization.md Run this command to install project dependencies before starting localization. ```bash yarn install --frozen-lockfile ``` -------------------------------- ### Example values.yaml with --set override Source: https://github.com/helm/helm-www/blob/main/docs/topics/charts.mdx This `values.yaml` file is valid because the missing `port` value can be provided via a `--set` flag during installation. ```yaml name: frontend protocol: https ``` -------------------------------- ### Helm Install Command with Custom Values Source: https://github.com/helm/helm-www/blob/main/docs/topics/charts.mdx Example of installing a Helm chart using a custom values file to override defaults. ```bash $ helm install --generate-name --values=myvals.yaml wordpress ``` -------------------------------- ### Helm Install Synopsis Source: https://github.com/helm/helm-www/blob/main/docs/helm/helm_install.md The basic syntax for the `helm install` command, specifying a release name and the chart to install. ```bash helm install [NAME] [CHART] [flags] ``` -------------------------------- ### Install a Helm chart with verification Source: https://github.com/helm/helm-www/blob/main/docs/topics/provenance.mdx Use `helm install --verify` to ensure chart integrity before installation. The install will abort if verification fails. ```console $ helm install --generate-name --verify mychart-0.1.0.tgz ``` -------------------------------- ### Run Helm Go SDK Examples Source: https://github.com/helm/helm-www/blob/main/sdkexamples/README.md Execute all provided Helm Go SDK examples. Ensure you are in the `helm-www/sdkexamples` directory before running. ```bash # cd helm-www/sdkexamples $ go run ./... ``` -------------------------------- ### Example Helm Release Notes (Markdown) Source: https://github.com/helm/helm-www/blob/main/community/release_checklist.md An example of release notes for a minor Helm release, detailing notable changes, installation instructions, and future release plans. Includes placeholders for version numbers and dates. ```markdown ## vX.Y.Z Helm vX.Y.Z is a feature release. This release, we focused on . Users are encouraged to upgrade for the best experience. The community keeps growing, and we'd love to see you there! - Join the discussion in [Kubernetes Slack](https://kubernetes.slack.com): - `#helm-users` for questions and just to hang out - `#helm-dev` for discussing PRs, code, and bugs - Hang out at the Public Developer Call: Thursday, 9:30 Pacific via [Zoom](https://zoom.us/j/696660622) - Test, debug, and contribute charts: [Artifact Hub helm charts](https://artifacthub.io/packages/search?kind=0) ## Notable Changes - Kubernetes 1.16 is now supported including new manifest apiVersions - Sprig was upgraded to 2.22 ## Installation and Upgrading Download Helm X.Y. The common platform binaries are here: - [MacOS amd64](https://get.helm.sh/helm-vX.Y.Z-darwin-amd64.tar.gz) ([checksum](https://get.helm.sh/helm-vX.Y.Z-darwin-amd64.tar.gz.sha256sum) / CHECKSUM_VAL) - [Linux amd64](https://get.helm.sh/helm-vX.Y.Z-linux-amd64.tar.gz) ([checksum](https://get.helm.sh/helm-vX.Y.Z-linux-amd64.tar.gz.sha256sum) / CHECKSUM_VAL) - [Linux arm](https://get.helm.sh/helm-vX.Y.Z-linux-arm.tar.gz) ([checksum](https://get.helm.sh/helm-vX.Y.Z-linux-arm.tar.gz.sha256) / CHECKSUM_VAL) - [Linux arm64](https://get.helm.sh/helm-vX.Y.Z-linux-arm64.tar.gz) ([checksum](https://get.helm.sh/helm-vX.Y.Z-linux-arm64.tar.gz.sha256sum) / CHECKSUM_VAL) - [Linux i386](https://get.helm.sh/helm-vX.Y.Z-linux-386.tar.gz) ([checksum](https://get.helm.sh/helm-vX.Y.Z-linux-386.tar.gz.sha256) / CHECKSUM_VAL) - [Linux ppc64le](https://get.helm.sh/helm-vX.Y.Z-linux-ppc64le.tar.gz) ([checksum](https://get.helm.sh/helm-vX.Y.Z-linux-ppc64le.tar.gz.sha256sum) / CHECKSUM_VAL) - [Linux s390x](https://get.helm.sh/helm-vX.Y.Z-linux-s390x.tar.gz) ([checksum](https://get.helm.sh/helm-vX.Y.Z-linux-s390x.tar.gz.sha256sum) / CHECKSUM_VAL) - [Windows amd64](https://get.helm.sh/helm-vX.Y.Z-windows-amd64.zip) ([checksum](https://get.helm.sh/helm-vX.Y.Z-windows-amd64.zip.sha256sum) / CHECKSUM_VAL) The [Quickstart Guide](/intro/quickstart.md) will get you going from there. For **upgrade instructions** or detailed installation notes, check the [install guide](/intro/install.mdx). You can also use a [script to install](https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-4) on any system with `bash`. ## What's Next - vX.Y.Z+1 will contain only bug fixes and is planned for . - vX.Y+1.0 is the next feature release and is planned for . This release will focus on ... ## Changelog - chore(*): bump version to v2.7.0 08c1144f5eb3e3b636d9775617287cc26e53dba4 (Adam Reese) - fix circle not building tags f4f932fabd197f7e6d608c8672b33a483b4b76fa (Matthew Fisher) ``` -------------------------------- ### Example Preflight Check Output Source: https://github.com/helm/helm-www/blob/main/community/hips/hip-0019.md This output demonstrates the expected results when running the Helm preflight checks. It shows failures for the required Kubernetes version and MySQL server version, along with a summary of the check statuses and the final installation error. ```text $ helm install ./ my-release Logs for pod: my-release-preflight-job-bgbz6, container: pre-install-job --- FAIL: Required Kubernetes Version --- The application requires at least Kubernetes 1.16.0, and recommends 1.18.0. --- FAIL: Must be MySQL 8.x or later --- Cannot connect to MySQL server --- FAIL preflight-tutorial FAILED name: cluster-resources status: completed completed: 1 total: 3 name: mysql/mysql status: running completed: 1 total: 3 name: mysql/mysql status: completed completed: 2 total: 3 name: cluster-info status: running completed: 2 total: 3 name: cluster-info status: completed completed: 3 total: 3 Error: INSTALLATION FAILED: failed pre-install: job failed: BackoffLimitExceeded ``` -------------------------------- ### Install Helm from Binary Release Script Source: https://github.com/helm/helm-www/blob/main/docs/intro/install.mdx Fetches and executes the official Helm installer script to install the latest version locally. This script is well-documented for review before execution. ```bash curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-4 chmod 700 get_helm.sh ./get_helm.sh ``` ```bash curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-4 | bash ``` -------------------------------- ### Install a Packaged Helm Chart Source: https://github.com/helm/helm-www/blob/main/docs/intro/using_helm.mdx Install a Helm chart from a packaged archive file using the `helm install` command. ```console $ helm install deis-workflow ./deis-workflow-0.1.0.tgz ... ``` -------------------------------- ### Install Chart by Reference and Repo URL Source: https://github.com/helm/helm-www/blob/main/docs/helm/helm_install.md Installs a chart using a reference name and specifying the chart repository URL directly. ```bash helm install --repo https://example.com/charts/ mynginx nginx ``` -------------------------------- ### Install Chart by Unpacked Directory Path Source: https://github.com/helm/helm-www/blob/main/docs/helm/helm_install.md Installs a chart from an unpacked chart directory on the local filesystem. ```bash helm install mynginx ./nginx ``` -------------------------------- ### Install Chart by Reference Source: https://github.com/helm/helm-www/blob/main/docs/helm/helm_install.md Installs a chart using its reference name, typically from a configured chart repository. ```bash helm install mymaria example/mariadb ``` -------------------------------- ### Example Static Auto-completion for a Plugin Source: https://github.com/helm/helm-www/blob/main/docs/topics/plugins.mdx An example `completion.yaml` for a plugin that accepts flags similar to `helm status` but has no sub-commands. ```yaml name: fullstatus flags: - o - output - revision ``` -------------------------------- ### Example values.yaml for Helm 3 Source: https://github.com/helm/helm-www/blob/main/community/hips/archives/helm/helm-v3/001-charts.md This is a basic example of a values.yaml file used in Helm. ```yaml name: frontend protocol: https port: 443 ``` -------------------------------- ### Install Chart by Absolute URL Source: https://github.com/helm/helm-www/blob/main/docs/helm/helm_install.md Installs a chart directly from a URL pointing to a packaged chart archive. ```bash helm install mynginx https://example.com/charts/nginx-1.2.3.tgz ``` -------------------------------- ### Install Chart with Set-File Flag Source: https://github.com/helm/helm-www/blob/main/docs/helm/helm_install.md Installs a chart and sets a value from the content of a specified file. ```bash helm install --set-file my_script=dothings.sh myredis ./redis ``` -------------------------------- ### Verify Plugin Installation Source: https://github.com/helm/helm-www/blob/main/docs/plugins/developer/tutorial-getter-plugin.mdx Check the plugins directory for the symlink created during local development installation. Also, list installed plugins to confirm the demo-getter is recognized. ```bash % ls -lah $(helm env HELM_PLUGINS) total 0 drwxr-xr-x@ 4 r6by staff 160B Nov 10 04:04 . drwxr-xr-x@ 3 r6by staff 96B Jan 21 2025 .. lrwxr-xr-x 1 r6by staff 41B Nov 10 04:04 demo-getter -> /Users/r6by/code/helm/plugins/demo-getter lrwxr-xr-x 1 r6by staff 41B Nov 10 02:18 system-info -> /Users/r6by/code/helm/plugins/system-info ``` ```bash % helm plugin list NAME VERSION TYPE APIVERSION PROVENANCE SOURCE demo-getter 0.1.0 getter/v1 v1 local dev unknown system-info 0.1.0 cli/v1 v1 local dev unknown ``` -------------------------------- ### Install Chart by OCI Registry Source: https://github.com/helm/helm-www/blob/main/docs/helm/helm_install.md Installs a chart from an OCI-compliant registry, specifying the version. ```bash helm install mynginx --version 1.2.3 oci://example.com/charts/nginx ``` -------------------------------- ### Install Chart with Values File Source: https://github.com/helm/helm-www/blob/main/docs/helm/helm_install.md Installs a chart using a custom values file to override default settings. ```bash helm install -f myvalues.yaml myredis ./redis ``` -------------------------------- ### Install Helm Chart with a Name Source: https://github.com/helm/helm-www/blob/main/docs/intro/CheatSheet.mdx Installs a Helm chart and assigns a specific name to this release instance. ```bash helm install ``` -------------------------------- ### Install Plugin in Dev Mode Source: https://github.com/helm/helm-www/blob/main/docs/plugins/developer/tutorial-getter-plugin.mdx Install the plugin from a local directory. This mode is for development and does not perform provenance checks. ```bash % helm plugin install $HOME/code/helm/plugins/demo-getter Installing plugin from local directory (development mode) Installed plugin: demo-getter ``` -------------------------------- ### Install and Verify Plugin Source: https://github.com/helm/helm-www/blob/main/docs/plugins/migrate.md Users can verify the plugin during installation using this command. For tarballs, verification is enabled by default. ```bash helm plugin install https://example.com/myplugin.tgz --verify ``` -------------------------------- ### Helm History Example Output Source: https://github.com/helm/helm-www/blob/main/docs/helm/helm_history.md An example of the formatted table output for the `helm history` command, showing different release revisions. ```bash $ helm history angry-bird REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION 1 Mon Oct 3 10:15:13 2016 superseded alpine-0.1.0 1.0 Initial install 2 Mon Oct 3 10:15:13 2016 superseded alpine-0.1.0 1.0 Upgraded successfully 3 Mon Oct 3 10:15:13 2016 superseded alpine-0.1.0 1.0 Rolled back to 2 4 Mon Oct 3 10:15:13 2016 deployed alpine-0.1.0 1.0 Upgraded successfully ``` -------------------------------- ### Install a Helm Chart Source: https://github.com/helm/helm-www/blob/main/docs/chart_template_guide/getting_started.md Installs a Helm chart with a release name. The chart's templates are rendered and applied to Kubernetes. ```bash $ helm install full-coral ./mychart NAME: full-coral LAST DEPLOYED: Tue Nov 1 17:36:01 2016 NAMESPACE: default STATUS: DEPLOYED REVISION: 1 TEST SUITE: None ``` -------------------------------- ### Install Helm Chart with Values File Source: https://github.com/helm/helm-www/blob/main/docs/intro/CheatSheet.mdx Installs a Helm chart using a custom values file, which can be a local path or a URL. ```bash helm install --values ``` -------------------------------- ### Install Chart with Multiple Values Files Source: https://github.com/helm/helm-www/blob/main/docs/helm/helm_install.md Installs a chart with values from multiple files, where later files override earlier ones. ```bash helm install -f myvalues.yaml -f override.yaml myredis ./redis ``` -------------------------------- ### Install Chart by Packaged File Path Source: https://github.com/helm/helm-www/blob/main/docs/helm/helm_install.md Installs a chart directly from a packaged chart archive file (e.g., a .tgz file). ```bash helm install mynginx ./nginx-1.2.3.tgz ``` -------------------------------- ### View Installed Manifests Source: https://github.com/helm/helm-www/blob/main/docs/chart_template_guide/debugging.md Use `helm get manifest` to view the templates that are currently installed on the Kubernetes server. This is useful for comparing deployed configurations. ```bash helm get manifest ``` -------------------------------- ### Install Chart with Custom Values Source: https://github.com/helm/helm-www/blob/main/docs/intro/using_helm.mdx Install a Helm chart using a custom `values.yaml` file to override default configurations. This example sets specific MariaDB authentication details. ```console $ echo '{mariadb.auth.database: user0db, mariadb.auth.username: user0}' > values.yaml $ helm install -f values.yaml bitnami/wordpress --generate-name ``` -------------------------------- ### Perform Helm List Action with Go SDK Source: https://github.com/helm/helm-www/blob/main/docs/sdk/gosdk.mdx This example demonstrates how to perform a `helm list` operation using the Go SDK. It initializes the action configuration, sets up the list client, and iterates over the results. Ensure the `HELM_DRIVER` environment variable is set if not using the default. ```go package main import ( "log" "os" "helm.sh/helm/v4/pkg/action" "helm.sh/helm/v4/pkg/cli" ) func main() { settings := cli.New() actionConfig := new(action.Configuration) // You can pass an empty string instead of settings.Namespace() to list // all namespaces if err := actionConfig.Init(settings.RESTClientGetter(), settings.Namespace(), os.Getenv("HELM_DRIVER"), log.Printf); err != nil { log.Printf("%+v", err) os.Exit(1) } client := action.NewList(actionConfig) // Only list deployed client.Deployed = true results, err := client.Run() if err != nil { log.Printf("%+v", err) os.Exit(1) } for _, rel := range results { log.Printf("%+v", rel) } } ``` -------------------------------- ### Helm Install from Different Sources Source: https://github.com/helm/helm-www/blob/main/docs/intro/using_helm.mdx Demonstrates various methods for installing Helm charts, including from a chart repository, a local archive, an unpacked directory, or a full URL. ```console helm install foo foo-0.1.1.tgz ``` ```console helm install foo path/to/foo ``` ```console helm install foo https://example.com/charts/foo-1.2.3.tgz ``` -------------------------------- ### Create Helm Chart with Starter Pack Source: https://github.com/helm/helm-www/blob/main/docs/topics/charts.mdx Use `helm create` with the `--starter` or `-p` flag to initialize a chart using a predefined starter pack. This allows for templated chart creation. ```bash helm create my-chart --starter starter-name ``` ```bash helm create my-chart -p starter-name ``` ```bash helm create my-chart -p /absolute/path/to/starter-name ``` -------------------------------- ### Helm --set Syntax Examples Source: https://github.com/helm/helm-www/blob/main/docs/intro/using_helm.mdx Illustrates the syntax for the `--set` flag in Helm, showing how to pass simple key-value pairs, multiple values, nested structures, lists, null values, and array indices. ```yaml name: value ``` ```yaml a: b c: d ``` ```yaml outer: inner: value ``` ```yaml name: - a - b - c ``` ```yaml name: [] a: null ``` ```yaml servers: - port: 80 ``` ```yaml servers: - port: 80 host: example ``` ```yaml name: "value1,value2" ``` ```yaml nodeSelector: kubernetes.io/role: master ``` -------------------------------- ### Templated CRD Instance in templates/ directory Source: https://github.com/helm/helm-www/blob/main/docs/topics/charts.mdx After CRDs are installed, Helm templates can create instances of custom resources. This example shows how to create a `CronTab` resource using Helm templating. ```yaml apiVersion: stable.example.com kind: CronTab metadata: name: {{ .Values.name }} spec: # ... ``` -------------------------------- ### Start Localized Site in Development Mode Source: https://github.com/helm/helm-www/blob/main/community/localization.md Test your localization changes by running the development server and specifying the locale you want to preview. ```bash yarn start --locale fr ``` -------------------------------- ### Helm Job Failure Output Example Source: https://github.com/helm/helm-www/blob/main/community/hips/hip-0019.md This text output illustrates the typical Helm installation failure message when a pre-install job, like the one defined previously, fails. It shows the command executed and the resulting error indicating a job failure. ```text $ helm install ./ my-release Logs for pod: my-release-false-job-bgbz6, container: pre-install-job foo Error: INSTALLATION FAILED: failed pre-install: job failed: BackoffLimitExceeded ``` -------------------------------- ### Helm Plugin List Command Output Example Source: https://github.com/helm/helm-www/blob/main/community/hips/hip-0026.md Illustrates the expected output format for the `helm plugin list` command, showing details like plugin name, version, type, signing status, and source URL. ```console NAME VERSION TYPE SIGNED SOURCE_URL s3 1.2.3 download 862HB19B https://gitlab.com/someone/s3-helm-plugin kustomize 4.0.0 post-render 208DD36E https://github.com/helm/helm my-nodejs 0.1.0 post-render N/A N/A ``` -------------------------------- ### List installed Helm plugins Source: https://github.com/helm/helm-www/blob/main/blog/2019-09-11-migrate-from-helm-v2-to-helm-v3.md List all installed Helm plugins, including the newly installed '2to3' plugin. This confirms the successful installation of the migration tool. ```bash $ helm3 plugin list NAME VERSION DESCRIPTION 2to3 0.2.0 migrate and cleanup Helm v2 configuration and releases in-place to Helm v3 ``` -------------------------------- ### Install Chart with Helm SDK Source: https://github.com/helm/helm-www/blob/main/docs/sdk/examples.mdx Installs a specified chart with a given version and values. Ensure the Helm SDK is properly configured before use. ```go package main import ( "fmt" "helm.sh/helm/v3/pkg/action" "helm.sh/helm/v3/pkg/chart/loader" "helm.sh/helm/v3/pkg/cli" "helm.sh/helm/v3/pkg/getter" ``` -------------------------------- ### Helm Install with Namespace Source: https://github.com/helm/helm-www/blob/main/community/hips/archives/helm/helm-v3/003-state.md When no namespace is specified during `helm install`, all resources, including the Release and Secret, are installed into the default namespace. ```console helm install -n foo bar # everything, including Release and Secret is installed into default namespace ``` -------------------------------- ### Install Chart by OCI Digest Source: https://github.com/helm/helm-www/blob/main/docs/overview.md Install a chart by its OCI digest for enhanced supply chain security. Charts with non-matching digests will not be installed. ```bash helm install myapp oci://registry.example.com/charts/app@sha256:abc123... ``` -------------------------------- ### List Installed Plugins Source: https://github.com/helm/helm-www/blob/main/docs/plugins/developer/tutorial-cli-plugin.mdx Verify the plugin installation by listing all installed Helm plugins. This command shows the plugin's name, version, type, and provenance. ```bash % helm plugin list NAME VERSION TYPE APIVERSION PROVENANCE SOURCE system-info 0.1.0 cli/v1 v1 local dev unknown ``` -------------------------------- ### Create Plugin Script Source: https://github.com/helm/helm-www/blob/main/docs/plugins/developer/tutorial-cli-plugin.mdx Write the executable script (system-info.sh) that will be run by the plugin. This script contains the logic to display system and Helm information. ```bash #!/bin/bash echo "=== System Information ===" echo "OS: $(uname -s)" echo "Architecture: $(uname -m)" echo "" echo "=== Helm Information ===" echo "Plugin Dir: $HELM_PLUGIN_DIR" echo "Arguments: $*" echo "" echo "System info complete!" ``` -------------------------------- ### Helm Plugin Install Options Source: https://github.com/helm/helm-www/blob/main/docs/helm/helm_plugin_install.md These options control the installation process, including certificate verification, authentication, and version specification. Use `--verify=false` to skip signature verification, though this is not recommended. ```bash --ca-file string \ verify certificates of HTTPS-enabled servers using this CA bundle --cert-file string \ identify registry client using this SSL certificate file -h, --help \ help for install --insecure-skip-tls-verify \ skip tls certificate checks for the plugin download --key-file string \ identify registry client using this SSL key file --keyring string \ location of public keys used for verification (default "~/.gnupg/pubring.gpg") --password string \ registry password --plain-http \ use insecure HTTP connections for the plugin download --username string \ registry username --verify \ verify the plugin signature before installing (default true) --version string \ specify a version constraint. If this is not specified, the latest version is installed ``` -------------------------------- ### Helm 3 CRD Installation Behavior Source: https://github.com/helm/helm-www/blob/main/community/hips/hip-0011.md Helm 3 installs CRDs from the `crds/` folder by default, but skips installation if the CRD already exists. Existing CRDs are not modified. ```bash # Helm 3 default behavior: CRDs in crds/ are installed if not present. # User can skip CRD installation with --skip-crds. # Existing CRDs are not modified. ``` -------------------------------- ### Install and Test a Helm Chart Source: https://github.com/helm/helm-www/blob/main/docs/topics/chart_tests.md Install a Helm chart to create a release, then use the `helm test` command to run the pre-defined tests for that release. This verifies the chart's functionality in the cluster. ```bash $ helm install demo demo --namespace default $ helm test demo ``` -------------------------------- ### Installing OCI Charts Source: https://github.com/helm/helm-www/blob/main/docs/topics/registries.mdx Use `helm install` with an OCI registry reference to deploy a chart. The chart's basename is included in the reference. ```bash $ helm install myrelease oci://localhost:5000/helm-charts/mychart --version 0.1.0 NAME: myrelease LAST DEPLOYED: Wed Oct 27 15:11:40 2021 NAMESPACE: default STATUS: deployed REVISION: 1 NOTES: ... ``` -------------------------------- ### Test Local Build and Serve Source: https://github.com/helm/helm-www/blob/main/AGENTS.md Before submitting a Pull Request, build and serve the website locally to test your changes. This command ensures everything is working as expected. ```bash yarn build && yarn serve ``` -------------------------------- ### Dry Run Helm Install for Template Testing Source: https://github.com/helm/helm-www/blob/main/docs/chart_template_guide/getting_started.md Use `helm install --debug --dry-run` to render templates without installing the chart. This is useful for testing template output and debugging. ```console $ helm install --debug --dry-run goodly-guppy ./mychart install.go:149: [debug] Original chart version: "" install.go:166: [debug] CHART PATH: /Users/ninja/mychart NAME: goodly-guppy LAST DEPLOYED: Thu Dec 26 17:24:13 2019 NAMESPACE: default STATUS: pending-install REVISION: 1 TEST SUITE: None USER-SUPPLIED VALUES: {} COMPUTED VALUES: affinity: {} fullnameOverride: "" image: pullPolicy: IfNotPresent repository: nginx imagePullSecrets: [] ingress: annotations: {} enabled: false hosts: - host: chart-example.local paths: [] tls: [] nameOverride: "" nodeSelector: {} podSecurityContext: {} replicaCount: 1 resources: {} securityContext: {} service: port: 80 type: ClusterIP serviceAccount: create: true name: null tolerations: [] HOOKS: MANIFEST: --- # Source: mychart/templates/configmap.yaml apiVersion: v1 kind: ConfigMap metadata: name: goodly-guppy-configmap data: myvalue: "Hello World" ``` -------------------------------- ### Install Helm Chart in Specific Namespace Source: https://github.com/helm/helm-www/blob/main/docs/intro/CheatSheet.mdx Installs a Helm chart into a designated Kubernetes namespace. ```bash helm install --namespace ``` -------------------------------- ### Example Helm Chart Repository Index File Source: https://github.com/helm/helm-www/blob/main/docs/topics/chart_repository.md A sample index.yaml file detailing metadata for Helm charts, including version, description, and download URLs. ```yaml apiVersion: v1 entries: alpine: - created: 2016-10-06T16:23:20.499814565-06:00 description: Deploy a basic Alpine Linux pod digest: 99c76e403d752c84ead610644d4b1c2f2b453a74b921f422b9dcb8a7c8b559cd home: https://helm.sh/helm name: alpine sources: - https://github.com/helm/helm urls: - https://technosophos.github.io/tscharts/alpine-0.2.0.tgz version: 0.2.0 - created: 2016-10-06T16:23:20.499543808-06:00 description: Deploy a basic Alpine Linux pod digest: 515c58e5f79d8b2913a10cb400ebb6fa9c77fe813287afbacf1a0b897cd78727 home: https://helm.sh/helm name: alpine sources: - https://github.com/helm/helm urls: - https://technosophos.github.io/tscharts/alpine-0.1.0.tgz version: 0.1.0 nginx: - created: 2016-10-06T16:23:20.499543808-06:00 description: Create a basic nginx HTTP server digest: aaff4545f79d8b2913a10cb400ebb6fa9c77fe813287afbacf1a0b897cdffffff home: https://helm.sh/helm name: nginx sources: - https://github.com/helm/charts urls: - https://technosophos.github.io/tscharts/nginx-1.1.0.tgz version: 1.1.0 generated: 2016-10-06T16:23:20.499029981-06:00 ``` -------------------------------- ### Install or Upgrade a Helm Release Source: https://github.com/helm/helm-www/blob/main/docs/howto/charts_tips_and_tricks.md Use `helm upgrade --install` to either install a new release or upgrade an existing one with a single command. This command checks if the release exists and performs the appropriate action. ```console $ helm upgrade --install --values ``` -------------------------------- ### Example Helm Template File Source: https://github.com/helm/helm-www/blob/main/docs/topics/charts.mdx This is an example of a Helm template file for a Kubernetes replication controller. It demonstrates how to use Go template syntax to dynamically set values such as image registry, tag, pull policy, and storage backend. ```yaml apiVersion: v1 kind: ReplicationController metadata: name: deis-database namespace: deis labels: app.kubernetes.io/managed-by: deis spec: replicas: 1 selector: app.kubernetes.io/name: deis-database template: metadata: labels: app.kubernetes.io/name: deis-database spec: serviceAccount: deis-database containers: - name: deis-database image: {{ .Values.imageRegistry }}/postgres:{{ .Values.dockerTag }} imagePullPolicy: {{ .Values.pullPolicy }} ports: - containerPort: 5432 env: - name: DATABASE_STORAGE value: {{ default "minio" .Values.storage }} ``` -------------------------------- ### Install Helm Chart with Dependency Update Source: https://github.com/helm/helm-www/blob/main/docs/intro/CheatSheet.mdx Ensures that chart dependencies are updated if they are missing before proceeding with the installation. ```bash helm install --dependency-update ``` -------------------------------- ### Create a New Helm Chart Source: https://github.com/helm/helm-www/blob/main/docs/chart_template_guide/getting_started.md Use the `helm create` command to generate a starter Helm chart. ```bash $ helm create mychart Creating mychart ``` -------------------------------- ### Install a Helm Package Source: https://github.com/helm/helm-www/blob/main/docs/intro/using_helm.mdx Use `helm install` to deploy a new package. Provide a unique release name and the chart name. Helm will output information about the deployment and any necessary next steps. ```bash $ helm install happy-panda bitnami/wordpress NAME: happy-panda LAST DEPLOYED: Tue Jan 26 10:27:17 2021 NAMESPACE: default STATUS: deployed REVISION: 1 NOTES: ** Please be patient while the chart is being deployed ** Your WordPress site can be accessed through the following DNS name from within your cluster: happy-panda-wordpress.default.svc.cluster.local (port 80) To access your WordPress site from outside the cluster follow the steps below: 1. Get the WordPress URL by running these commands: NOTE: It may take a few minutes for the LoadBalancer IP to be available. Watch the status with: 'kubectl get svc --namespace default -w happy-panda-wordpress' export SERVICE_IP=$(kubectl get svc --namespace default happy-panda-wordpress --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}") echo "WordPress URL: http://$SERVICE_IP/" echo "WordPress Admin URL: http://$SERVICE_IP/admin" 2. Open a browser and access WordPress using the obtained URL. 3. Login with the following credentials below to see your blog: echo Username: user echo Password: $(kubectl get secret --namespace default happy-panda-wordpress -o jsonpath="{.data.wordpress-password}" | base64 --decode) ```