Ubuntu 20.04
Sponsored Link

Kubernetes : Helm インストール2020/08/21

 
Helm をインストールすると、Kubernetes アプリケーションのイントール等々の管理が容易になります。
[1] Helm をインストールします。
root@dlp:~#
curl -O https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
root@dlp:~#
bash ./get-helm-3

Downloading https://get.helm.sh/helm-v3.3.0-linux-amd64.tar.gz
Preparing to install helm into /usr/local/bin
helm installed into /usr/local/bin/helm
root@dlp:~#
helm version

version.BuildInfo{Version:"v3.3.0", GitCommit:"8a4aeec08d67a7b84472007529e8097ec3742105", GitTreeState:"dirty", GoVersion:"go1.14.7"}
[2] Helm の基本操作です。
# Helm Hub からキーワードが含まれるチャートを検索

root@dlp:~#
helm search hub wordpress

URL                                                     CHART VERSION   APP VERSION     DESCRIPTION                         
https://hub.helm.sh/charts/bitnami/wordpress            9.5.0           5.5.0           Web publishing platform for building blogs and ...
https://hub.helm.sh/charts/presslabs/wordpress-...      0.10.4          0.10.4          Presslabs WordPress Operator Helm Chart
https://hub.helm.sh/charts/presslabs/wordpress-...      v0.10.2         v0.10.2         A Helm chart for deploying a WordPress site on ...

# リポジトリを追加

# 以下はオフィシャル Helm Stable リポジトリ

root@dlp:~#
helm repo add stable https://kubernetes-charts.storage.googleapis.com/

"stable" has been added to your repositories
# リポジトリ一覧

root@dlp:~#
helm repo list

NAME    URL
stable  https://kubernetes-charts.storage.googleapis.com/

# リポジトリからキーワードが含まれるチャートを検索

root@dlp:~#
helm search repo stable

NAME                                    CHART VERSION   APP VERSION             DESCRIPTION                                 
stable/acs-engine-autoscaler            2.2.2           2.1.1                   DEPRECATED Scales worker nodes within agent pools
stable/aerospike                        0.3.2           v4.5.0.5                A Helm chart for Aerospike in Kubernetes    
stable/airflow                          7.5.0           1.10.10                 Airflow is a platform to programmatically autho...
stable/ambassador                       5.3.2           0.86.1                  DEPRECATED A Helm chart for Datawire Ambassador
stable/anchore-engine                   1.6.9           0.7.2                   Anchore container analysis and policy evaluatio...
stable/apm-server                       2.1.5           7.0.0                   The server receives data from the Elastic APM a...
.....
.....

# チャートの情報を表示

# helm show [all|chart|readme|values] [チャート名]

root@dlp:~#
helm show chart stable/docker-registry

apiVersion: v1
appVersion: 2.7.1
description: A Helm chart for Docker Registry
home: https://hub.docker.com/_/registry/
icon: https://hub.docker.com/public/images/logos/mini-logo.svg
maintainers:
- email: jpds@protonmail.com
  name: jpds
- email: pete.brown@powerhrg.com
  name: rendhalver
name: docker-registry
sources:
- https://github.com/docker/distribution-library-image
version: 1.9.4

# チャートからアプリケーションをデプロイ

# helm install [任意の名称] [チャート名]

root@dlp:~#
helm install registry stable/docker-registry

NAME: registry
LAST DEPLOYED: Fri Aug 20 19:53:21 2020
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
1. Get the application URL by running these commands:
  export POD_NAME=$(kubectl get pods --namespace default -l "app=docker-registry,release=registry" -o jsonpath="{.items[0].metadata.name}")
  echo "Visit http://127.0.0.1:8080 to use your application"
  kubectl -n default port-forward $POD_NAME 8080:5000

# デプロイ済みアプリケーションの一覧

root@dlp:~#
helm list

NAME            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                       APP VERSION
registry        default         1               2020-08-20 19:53:21.363862322 +0900 JST deployed        docker-registry-1.9.4       2.7.1

# デプロイ済みアプリケーションのステータスを表示

root@dlp:~#
helm status registry

NAME: registry
LAST DEPLOYED: Fri Aug 21 14:53:21 2020
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
.....
.....

# デプロイ済みアプリケーションをアンインストール

root@dlp:~#
helm uninstall registry

release "registry" uninstalled
関連コンテンツ