YJWANG

Nexus Helm repo에 Chart push 하기 본문

60.Cloud/80.Kubernetes

Nexus Helm repo에 Chart push 하기

왕영주 2021. 2. 16. 16:10

Push할 Chart를 선택하고 아래 Link에 소개된 helm plug-in을 통해 push한다. git Package가 설치돼있어야 한다.

설치 및 확인

[root@ha01-master-1 helm]# helm plugin install --version master https://github.com/sonatype-nexus-community/helm-nexus-push.git
Installed plugin: nexus-push

[root@ha01-master-1 helm]# helm nexus-push --help
Push Helm Chart to Nexus repository

This plugin provides ability to push a Helm Chart directory or package to a
remote Nexus Helm repository.

Usage:
  helm nexus-push [repo] login [flags]        Setup login information for repo
  helm nexus-push [repo] logout [flags]       Remove login information for repo
  helm nexus-push [repo] [CHART] [flags]      Pushes chart to repo

Flags:
  -u, --username string                 Username for authenticated repo (assumes anonymous access if unspecified)
  -p, --password string                 Password for authenticated repo (prompts if unspecified and -u specified)

아래 repo에 배포할 예정

[root@ha01-master-1 helm]# helm repo list
NAME     URL                                        
local    http://1.2.3.4.5:31806/repository/test/

Push 진행

[root@ha01-master-1 helm]# helm nexus-push local ./mychart -u admin -p password
Pushing ./mychart to repo http://1.2.3.4.5:31806/repository/test//...
  HTTP/1.1 100 Continue

  HTTP/1.1 200 OK
  Date: Tue, 16 Feb 2021 06:31:13 GMT
  Server: Nexus/3.29.2-02 (OSS)
  X-Content-Type-Options: nosniff
  Content-Security-Policy: sandbox allow-forms allow-modals allow-popups allow-presentation allow-scripts allow-top-navigation
  X-XSS-Protection: 1; mode=block
  Content-Length: 0

Done

이후 chart list를 update 하고 확인한다.

[root@ha01-master-1 helm]# helm repo update 
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "local" chart repository
Update Complete. ⎈Happy Helming!⎈

[root@ha01-master-1 helm]# helm search repo
NAME             CHART VERSION    APP VERSION    DESCRIPTION                
local/mychart    0.1.0            1.16.0         A Helm chart for Kubernetes

완료.

반응형