2
2

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.

Raspberry pi に k3s と helm 入れるのに四苦八苦

Last updated at Posted at 2019-05-21

2019/05/24 追記

Helm インストール後にエラー(後述)。
そもそも、k3sに対応していないのではないか?等、色々調査しました。

結局、こちらの記事に行き着いて、なんとか解決しました。

export KUBECONFIG=/etc/rancher/k3s/k3s.yaml

Helm導入後に、↓の感じで config を教えてあげる必要があるみたいです。

$ export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
$ helm version
Client: &version.Version{SemVer:"v2.14.0", GitCommit:"05811b84a3f93603dd6c2fcfe57944dfa7ab7fd0", GitTreeState:"clean"}
Error: could not find tiller

この後、tillerの設定をして完了。

$ kubectl create serviceaccount --namespace kube-system tiller
$ kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
$ helm init --service-account tiller --history-max 200 --tiller-image jessestuart/tiller
$ kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'

※ 正しい順番が曖昧です。ミソは arm 対応の tiller-image を指定してあげること。

もし参考にしてくださった方がいるならば、ご迷惑をおかけしました。
kubernetesの道のりは長い・・・

インストール行程

k3s

余計なことは考えず、公式のコマンドを叩く。

curl -sfL https://get.k3s.io | sh -

Helm

普通にぐぐったら、Stack Overflowで先人の知恵

wget https://kubernetes-helm.storage.googleapis.com/helm-$HELM_VERSION-linux-arm.tar.gz

wget で公式から落とすコマンド・・・

githubのReleaseに arm バイナリも提供されてました。

arm バイナリは無いだろう(だろう運転)。悲しき習慣

先人の知恵(スクリプト)を改修して、最新バージョン対応にしてみた。

HELM_VERSION=v2.14.0 ; HELM_INSTALL_DIR=/usr/local/bin/ ; wget https://kubernetes-helm.storage.googleapis.com/helm-${HELM_VERSION}-linux-arm.tar.gz -O - | tar --strip=1 -C ${HELM_INSTALL_DIR} --no-same-owner --no-same-permissions -xzvf - linux-arm/helm ; chmod +x ${HELM_INSTALL_DIR}/helm

怒涛のワンライナー

tar コマンドで参考にしたところはこちら

("-" の置き場所で小一時間ハマったのは内緒)

$ helm version
Client: &version.Version{SemVer:"v2.14.0", GitCommit:"05811b84a3f93603dd6c2fcfe57944dfa7ab7fd0", GitTreeState:"clean"}
Error: Get http://localhost:8080/api/v1/namespaces/kube-system/pods?labelSelector=app%3Dhelm%2Cname%3Dtiller: dial tcp [::1]:8080: connect: connection refused
2
2
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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?