0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Helmのセットアップに関する個人メモ

Posted at

はじめに

Docker/Kubernetes 実践コンテナ開発入門 でKubernetesを学習中に、Helmのセットアップで躓いたのでまとめました。

躓いた点

helm initが書籍の記載通りにできませんでした。

$ helm init
The Kubernetes package manager

Common actions for Helm:

- helm search:    search for charts
- helm pull:      download a chart to your local directory to view
- helm install:   upload the chart to Kubernetes
- helm list:      list releases of charts

(中略)

Use "helm [command] --help" for more information about a command.

解決までの手順

  • 書籍のサポートページに何か情報がないかどうか確認
  • Helmのバージョンを確認
    • brew installした際に、3系がインストールされていることを確認
  • 3系でTillerが削除される等、大きな変更があったことを確認
  • 書籍では、2系が利用されていたので、2系をインストールし直すことにした
    • brew uninstallで3系はアンインストール

Helmの2系をインストール

brewでバージョン指定してインストールしようと思ったのですが、いろいろエラーが出てしまい時間がかかりそうだったので、公式ドキュメントを参考に手動でインストールしました。

希望のバージョンをダウンロード

今回はv2.16.0にしました。

ダウンロードしてきたtar.gzを解凍

$ tar -zxvf helm-v2.16.0-darwin-amd64.tar.gz 

helmバイナリを/usr/local/binに移動

$ mv darwin-amd64/helm /usr/local/bin/helm

Helmのセットアップ

インストールした後に、helm version

$ helm version
Client: &version.Version{SemVer:"v2.16.0", GitCommit:"e13bc94621d4ef666270cfbe734aaabf342a49bb", GitTreeState:"clean"}
Error: could not find tiller

initしてみる。

$ helm init

(中略)

Adding stable repo with URL: https://kubernetes-charts.storage.googleapis.com 
Adding local repo with URL: http://127.0.0.1:8879/charts 
$HELM_HOME has been configured at /Users/<username>/.helm.

Tiller (the Helm server-side component) has been installed into your Kubernetes Cluster.

Please note: by default, Tiller is deployed with an insecure 'allow unauthenticated users' policy.
To prevent this, run `helm init` with the --tiller-tls-verify flag.
For more information on securing your installation see: https://docs.helm.sh/using_helm/#securing-your-helm-installation

initできました。
Tillerのサーバアプリケーションがkube-systemネームスペースにデプロイされていることを確認してみます。

$ kubectl -n kube-system get service,deployment,pod --selector app=helm
NAME                    TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)     AGE
service/tiller-deploy   ClusterIP   10.97.204.96   <none>        44134/TCP   20s

NAME                                  READY   UP-TO-DATE   AVAILABLE   AGE
deployment.extensions/tiller-deploy   1/1     1            1           20s

NAME                               READY   STATUS    RESTARTS   AGE
pod/tiller-deploy-565767cb-nwljs   1/1     Running   0          20s

最後にバージョンを表示。

$ helm version
Client: &version.Version{SemVer:"v2.16.0", GitCommit:"e13bc94621d4ef666270cfbe734aaabf342a49bb", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.16.0", GitCommit:"e13bc94621d4ef666270cfbe734aaabf342a49bb", GitTreeState:"clean"}

書籍の記載のように、クライアント(cli)とサーバ(k8sクラスタにインストールされているTiller)のHelmのバージョンを確認できました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?