Helm Package Manager

Reference: helm.sh, Google Cloud Training - Helm Package Manager, bmc blogs - Introduction to Kubernetes Helm Charts

What is Helm?

  • Kubernetes package manager์ด๋‹ค

    • K8s equivalent of yum , apt, or npm!

  • Helm์€ charts๋ผ๋Š” packaging format์„ ์‚ฌ์šฉํ•œ๋‹ค

    • ์—ฌ๊ธฐ์„œ chart๋Š” k8s resources๋ฅผ describeํ•˜๋Š” file๋“ค์˜ ์ง‘ํ•ฉ์ด๋‹ค

    • chart๋Š” ๋ฌด์–ธ๊ฐ€๋ฅผ ๋ฐฐํฌํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉ๋œ๋‹ค

      • ex) memcached pod, web app w/ HTTP servers, databases, etc.

    • chart๋Š” ํŠน์ • directory tree๋กœ ๊ตฌ์„ฑ๋œ file๋“ค๋กœ ์ƒ์„ฑ๋˜์–ด ์žˆ๋‹ค

      • ์ด file๋“ค์€ ๋ฐฐํฌ๋  version์˜ archive๋กœ packaging ๋  ์ˆ˜ ์žˆ๋‹ค

The Chart File Structure

  • Chart๋Š” directory ๋‚ด๋ถ€์— ์ผ๋ จ์˜ ํŒŒ์ผ๋“ค๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ๋‹ค

  • Directory์˜ ์ด๋ฆ„ == chart ์ด๋ฆ„ (versioning ์ •๋ณด๋ฅผ ์ œ์™ธํ•œ)์ด๋‹ค

    • ex) WordPress๋ฅผ describe ํ•˜๋Š” chart๋Š” wordpress/์— ์ €์žฅ๋œ๋‹ค

  • Directory ๋‚ด๋ถ€์—, Helm์€ ์•„๋ž˜์˜ ๊ตฌ์กฐ๋ฅผ ํ•„์š”๋กœ ํ•œ๋‹ค

    wordpress/
      Chart.yaml          # A YAML file containing information about the chart
      LICENSE             # OPTIONAL: A plain text file containing the license for the chart
      README.md           # OPTIONAL: A human-readable README file
      values.yaml         # The default configuration values for this chart
      values.schema.json  # OPTIONAL: A JSON Schema for imposing a structure on the values.yaml file
      charts/             # A directory containing any charts upon which this chart depends.
      crds/               # Custom Resource Definitions
      templates/          # A directory of templates that, when combined with values,
                          # will generate valid Kubernetes manifest files.
      templates/NOTES.txt # OPTIONAL: A plain text file containing short usage notes
    • Helm์€ charts/, crds/, templates/ directory์™€ ์œ„์˜ ์˜ˆ์‹œ์— ๋‚˜์™€์žˆ๋Š” ๋ชจ๋“  ํŒŒ์ผ๋“ค์˜ ์ด๋ฆ„์„ ์˜ˆ์•ฝํ•˜์—ฌ ์‚ฌ์šฉํ•œ๋‹ค

The Chart.yaml File

Chart.yaml file์€ chart์˜ ํ•„์ˆ˜ ๊ตฌ์„ฑ ์š”์†Œ์ด๋ฉฐ, ์•„๋ž˜์˜ fields๋ฅผ ํฌํ•จํ•˜๊ณ  ์žˆ๋‹ค

apiVersion: The chart API version (required)
name: The name of the chart (required)
version: A SemVer 2 version (required)
kubeVersion: A SemVer range of compatible Kubernetes versions (optional)
description: A single-sentence description of this project (optional)
type: The type of the chart (optional)
keywords:
  - A list of keywords about this project (optional)
home: The URL of this projects home page (optional)
sources:
  - A list of URLs to source code for this project (optional)
dependencies: # A list of the chart requirements (optional)
  - name: The name of the chart (nginx)
    version: The version of the chart ("1.2.3")
    repository: (optional) The repository URL ("https://example.com/charts") or alias ("@repo-name")
    condition: (optional) A yaml path that resolves to a boolean, used for enabling/disabling charts (e.g. subchart1.enabled )
    tags: # (optional)
      - Tags can be used to group charts for enabling/disabling together
    import-values: # (optional)
      - ImportValues holds the mapping of source values to parent key to be imported. Each item can be a string or pair of child/parent sublist items.
    alias: (optional) Alias to be used for the chart. Useful when you have to add the same chart multiple times
maintainers: # (optional)
  - name: The maintainers name (required for each maintainer)
    email: The maintainers email (optional for each maintainer)
    url: A URL for the maintainer (optional for each maintainer)
icon: A URL to an SVG or PNG image to be used as an icon (optional).
appVersion: The version of the app that this contains (optional). Needn't be SemVer. Quotes recommended.
deprecated: Whether this chart is deprecated (optional, boolean)
annotations:
  example: A list of annotations keyed by name (optional).

์œ„์— ๋ช…์‹œ๋˜์–ด ์žˆ์ง€ ์•Š์€ ๋‹ค๋ฅธ fields๋Š” ์ ์šฉ๋˜์ง€ ์•Š๋Š”๋‹ค

Last updated