LoginSignup
1
0

More than 1 year has passed since last update.

M1 Macで operator-sdkで`Version v3.8.7 does not exist or is not available for darwin/arm64.`が出たときの解決方法

Last updated at Posted at 2022-08-20

エラー

operator-sdkでinitしたprojectがM1マックだと以下のKustomizeのインストールエラーになる

+ make kustomize
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash -s -- 3.8.7 /path/to/your/project/bin
Version v3.8.7 does not exist or is not available for darwin/arm64.

問題

  1. operator-sdkは、defaultでkustomizeのv3.8.7を使う
  2. darwin/arm64は goreleaserのv0.156.0で始めてサポートされ、kustomizeの最後のv3リリースではgoreleaserのv0.155.0を使っていたのでv3では darwin/arm64がない
  3. darwin/arm64は、goreleaserをv0.172.1にアップグレードしたkustomizeのv4.2.0からリリースされている
  4. 結果M1マックだとdefaultでkustomizeをインストールする際に上記のエラーが発生

From comment

解決策

自分でKUSTOMIZE_VERSIONv4.2以降を指定する

export KUSTOMIZE_VERSION=v4.2.0
make test

v1.23.0 で kustomize v4.5.5がサポートされた(ansible/v1とhelm/v1)

Bump kubebuilder release 3.6.0, upgrade kustomize and add support for Apple Silicon #5965で更新されるのでreleaseを待つ (2022/08/12にマージされた)

v1.23.0が8月24日にリリースされて解決した!
が、Makefile内のKUSTOMIZE_VERSIONは未だに3.8.7なので、KUSTOMIZE_VERSIONの指定は未だに必要そう。

現状: まだサポートされていない

We do not support arm64 yet, using the master branch, you might work around the kustomize issue with kubebuilder init --plugins=kustomize/v2-alpha,base.go.kubebuilder.io/v3 now. But we are still unable to use the env test. (kubebuilder#2683 quick start error in my mac m1)

関連GitHub Issues・PRs

  1. kustomize#4612 Produce darwin/arm64 binaries for v3
    1. https://github.com/kubernetes-sigs/kustomize/issues/4612#issuecomment-1119864853
  2. operator-sdk#5785 KUSTOMIZE_VERSION ?= v3.8.7 on bump-kb.yaml breaking the "Install the CRDs into the cluster" step on the kubebuilder Quick Start
  3. operator-sdk#5965 Bump kubebuilder release 3.6.0, upgrade kustomize and add support for Apple Silicon
  4. https://github.com/kubernetes-sigs/kustomize/releases/tag/kustomize%2Fv4.2.0
  5. kubebuilder#1932: Support for arm macOS
  6. kubebuilder#2785 ✨ (go/v4-alpha) new alpha plugin using kustomize v4 (add support for Apple Silicon)
  7. kubebuilder#2683 quick start error in my mac m1
1
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
1
0