helm install

helm install (차트 설치)

helm install 명령은 차트(chart)를 Kubernetes에 설치합니다. 차트 참조, 패키징된 차트 경로, 혹은 압축 해제된 차트 디렉터리 경로 등으로 설치 대상을 지정할 수 있습니다.

출처: 문서

본문

Synopsis

이 명령은 차트 아카이브를 설치합니다.

install 인자는 차트 참조, 패키징된 차트 경로, 압축 해제된 차트 디렉터리 경로 또는 URL이어야 합니다.

차트의 값을 덮어쓰려면 --values 플래그로 파일을 전달하거나 --set 플래그로 명령줄에서 설정을 전달합니다. 문자열 값을 강제하려면 --set-string 을 사용합니다. 값 자체가 명령줄에 넣기 너무 길거나 동적으로 생성될 때는 --set-file 로 파일에서 개별 값을 설정할 수 있습니다. --set-json 으로 명령줄에서 JSON 값(스칼라/객체/배열)을 설정할 수도 있으며, JSON 객체를 문자열로 전달할 수도 있습니다.

$ helm install -f myvalues.yaml myredis ./redis

또는

$ helm install --set name=prod myredis ./redis

또는

$ helm install --set-string long_int=1234567890 myredis ./redis

또는

$ helm install --set-file my_script=dothings.sh myredis ./redis

또는

$ helm install --set-json 'master.sidecars=[{"name":"sidecar","image":"myImage","imagePullPolicy":"Always","ports":[{"name":"portname","containerPort":1234}]}]' myredis ./redis

또는

$ helm install --set-json '{"master":{"sidecars":[{"name":"sidecar","image":"myImage","imagePullPolicy":"Always","ports":[{"name":"portname","containerPort":1234}]}]}}' myredis ./redis

--values/-f 플래그는 여러 번 지정할 수 있습니다. 가장 마지막(가장 오른쪽)에 지정된 파일이 우선합니다. 예를 들어, myvalues.yamloverride.yaml 모두에 Test 라는 키가 있다면 override.yaml 에 설정된 값이 우선합니다.

$ helm install -f myvalues.yaml -f override.yaml  myredis ./redis

--set 플래그도 여러 번 지정할 수 있습니다. 가장 마지막(가장 오른쪽)에 지정된 설정이 우선합니다. 예를 들어, foo 라는 키에 barnewbar 두 값이 모두 설정되면 newbar 값이 우선합니다.

$ helm install --set foo=bar --set foo=newbar  myredis ./redis

마찬가지로, 다음 예에서는 foo["four"] 로 설정됩니다.

$ helm install --set-json='foo=["one", "two", "three"]' --set-json='foo=["four"]' myredis ./redis

그리고 다음 예에서는 foo{"key1":"value1","key2":"bar"} 로 설정됩니다.

$ helm install --set-json='foo={"key1":"value1","key2":"value2"}' --set-json='foo.key2="bar"' myredis ./redis

차트를 설치하지 않고 릴리스의 생성된 매니페스트를 확인하려면 --debug--dry-run 플래그를 함께 사용할 수 있습니다.

--dry-run 플래그는 민감한 값을 담을 수 있는 Secret을 포함한 모든 생성된 차트 매니페스트를 출력합니다. Kubernetes Secret을 숨기려면 --hide-secret 플래그를 사용하세요. 이러한 플래그를 어떻게, 언제 사용할지 신중히 고려하십시오.

--verify 가 설정되면 차트에 반드시 프로비넌스(provenance) 파일이 있어야 하며, 그 파일이 모든 검증 단계를 통과해야 합니다.

설치할 차트를 표현하는 방법은 여섯 가지가 있습니다.

  • 차트 참조로: helm install mymaria example/mariadb
  • 패키징된 차트 경로로: helm install mynginx ./nginx-1.2.3.tgz
  • 압축 해제된 차트 디렉터리 경로로: helm install mynginx ./nginx
  • 절대 URL로: helm install mynginx https://example.com/charts/nginx-1.2.3.tgz
  • 차트 참조와 저장소 URL로: helm install --repo https://example.com/charts/ mynginx nginx
  • OCI 레지스트리로: helm install mynginx --version 1.2.3 oci://example.com/charts/nginx

차트 참조 (CHART REFERENCES)

차트 참조는 차트 저장소의 차트를 참조하는 편리한 방법입니다.

저장소 접두사가 있는 차트 참조(example/mariadb)를 사용하면 Helm은 로컬 설정에서 example 이라는 차트 저장소를 찾고, 그 저장소에서 mariadb 라는 이름의 차트를 찾습니다. --devel 플래그로 개발 버전(alpha, beta, release candidate)도 포함하지 않는 한, 해당 차트의 최신 안정 버전을 설치합니다. 또는 --version 플래그로 버전 번호를 지정할 수 있습니다.

차트 저장소 목록을 보려면 helm repo list 를, 저장소에서 차트를 검색하려면 helm search 를 사용하세요.

helm install [NAME] [CHART] [flags]

옵션 (Options)

      --ca-file string                             verify certificates of HTTPS-enabled servers using this CA bundle
      --cert-file string                           identify HTTPS client using this SSL certificate file
      --create-namespace                           create the release namespace if not present
      --dependency-update                          update dependencies if they are missing before installing the chart
      --description string                         add a custom description
      --devel                                      use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored
      --disable-openapi-validation                 if set, the installation process will not validate rendered templates against the Kubernetes OpenAPI Schema
      --dry-run string[="unset"]                   simulates the operation without persisting changes. Must be one of: "none" (default), "client", or "server". '--dry-run=none' executes the operation normally and persists changes (no simulation). '--dry-run=client' simulates the operation client-side only and avoids cluster connections. '--dry-run=server' simulates the operation on the server, requiring cluster connectivity. (default "none")
      --enable-dns                                 enable DNS lookups when rendering templates
      --force-conflicts                            if set server-side apply will force changes against conflicts
      --force-replace                              force resource updates by replacement
  -g, --generate-name                              generate the name (and omit the NAME parameter)
  -h, --help                                       help for install
      --hide-notes                                 if set, do not show notes in install output. Does not affect presence in chart metadata
      --hide-secret                                hide Kubernetes Secrets when also using the --dry-run flag
      --insecure-skip-tls-verify                   skip tls certificate checks for the chart download
      --key-file string                            identify HTTPS client using this SSL key file
      --keyring string                             location of public keys used for verification (default "~/.gnupg/pubring.gpg")
  -l, --labels stringToString                      Labels that would be added to release metadata. Should be divided by comma. (default [])
      --name-template string                       specify template used to name the release
      --no-hooks                                   prevent hooks from running during install
  -o, --output format                              prints the output in the specified format. Allowed values: table, json, yaml (default table)
      --pass-credentials                           pass credentials to all domains
      --password string                            chart repository password where to locate the requested chart
      --plain-http                                 use insecure HTTP connections for the chart download
      --post-renderer postRendererString           the name of a postrenderer type plugin to be used for post rendering. If it exists, the plugin will be used
      --post-renderer-args postRendererArgsSlice   an argument to the post-renderer (can specify multiple) (default [])
      --render-subchart-notes                      if set, render subchart notes along with the parent
      --replace                                    reuse the given name, only if that name is a deleted release which remains in the history. This is unsafe in production
      --repo string                                chart repository url where to locate the requested chart
      --rollback-on-failure                        if set, Helm will rollback (uninstall) the installation upon failure. The --wait flag will be default to "watcher" if --rollback-on-failure is set
      --server-side                                object updates run in the server instead of the client (default true)
      --set stringArray                            set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
      --set-file stringArray                       set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
      --set-json stringArray                       set JSON values on the command line (can specify multiple or separate values with commas: key1=jsonval1,key2=jsonval2 or using json format: {"key1": jsonval1, "key2": "jsonval2"})
      --set-literal stringArray                    set a literal STRING value on the command line
      --set-string stringArray                     set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
      --skip-crds                                  if set, no CRDs will be installed. By default, CRDs are installed if not already present
      --skip-schema-validation                     if set, disables JSON schema validation
      --take-ownership                             if set, install will ignore the check for helm annotations and take ownership of the existing resources
      --timeout duration                           time to wait for any individual Kubernetes operation (like Jobs for hooks) (default 5m0s)
      --username string                            chart repository username where to locate the requested chart
  -f, --values strings                             specify values in a YAML file or a URL (can specify multiple)
      --verify                                     verify the package before using it
      --version string                             specify a version constraint for the chart version to use. This constraint can be a specific tag (e.g. 1.1.1) or it may reference a valid range (e.g. ^2.0.0). If this is not specified, the latest version is used
      --wait WaitStrategy[=watcher]                wait until resources are ready (up to --timeout). Use '--wait' alone for 'watcher' strategy, or specify one of: 'watcher', 'hookOnly', 'legacy'. Default when flag is omitted: 'hookOnly'. (default hookOnly)
      --wait-for-jobs                              if set and --wait enabled, will wait until all Jobs have been completed before marking the release as successful. It will wait for as long as --timeout

상위 명령에서 상속된 옵션 (Options inherited from parent commands)

      --burst-limit int                 클라이언트 측 기본 스로틀링 한도 (기본값 100)
      --color string                    색상 출력 사용 (never, auto, always) (기본값 "auto")
      --colour string                   색상 출력 사용 (never, auto, always) (기본값 "auto")
      --content-cache string            캐시된 콘텐츠(예: 차트)가 담긴 디렉터리 경로 (기본값 "~/.cache/helm/content")
      --debug                           상세 출력 활성화
      --kube-apiserver string           Kubernetes API 서버의 주소와 포트
      --kube-as-group stringArray       작업에 가장(impersonate)할 그룹. 이 플래그를 반복해서 여러 그룹을 지정할 수 있음
      --kube-as-user string             작업에 가장(impersonate)할 사용자 이름
      --kube-ca-file string             Kubernetes API 서버 연결에 사용할 인증기관(certificate authority) 파일
      --kube-context string             사용할 kubeconfig 컨텍스트 이름
      --kube-insecure-skip-tls-verify   true로 설정하면 Kubernetes API 서버 인증서의 유효성을 검사하지 않음. HTTPS 연결이 안전하지 않게 됨
      --kube-tls-server-name string     Kubernetes API 서버 인증서 검증에 사용할 서버 이름. 제공하지 않으면 서버 접속에 사용된 호스트명을 사용
      --kube-token string               인증에 사용되는 bearer 토큰
      --kubeconfig string               kubeconfig 파일 경로
  -n, --namespace string                이 요청의 네임스페이스 범위
      --qps float32                     bursting을 제외하고 Kubernetes API와 통신할 때 사용하는 초당 쿼리 수
      --registry-config string          레지스트리 설정 파일 경로 (기본값 "~/.config/helm/registry/config.json")
      --repository-cache string         캐시된 저장소 인덱스가 담긴 디렉터리 경로 (기본값 "~/.cache/helm/repository")
      --repository-config string        저장소 이름과 URL이 담긴 파일 경로 (기본값 "~/.config/helm/repositories.yaml")

더 알아보기 (Learn more)

  • helm — Kubernetes용 Helm 패키지 매니저
  • helm upgrade — 릴리스 업그레이드
  • helm get — 이름이 지정된 릴리스의 확장 정보 다운로드