How to resolve “Version v3.8.7 does not exist or is not available for darwin/arm64.” error when using operator-sdk on M1 mac
1 min readAug 20, 2022
Error
You might get the following error if you’re developing Kubernetes operator with operator-sdk version ≤ around v1.22.2 (the latest version as of the time of writing this post):
+ 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.
Root Cause
- operator-sdk uses kustomize v3.8.7 by default.
- kustomize uses goreleaser.
- goreleaser supported
darwin/arm64
in v0.156.0 - kustomize supported
darwin/arm64
in v4.2.0.
Solution 1: Simply specify the KUSTOMIZE_VERSION
As you can see it in the Makefile
## Tool Versions
KUSTOMIZE_VERSION ?= v3.8.7
You can pass a specific version when you use make commands like:
export KUSTOMIZE_VERSION=v4.2.0
make test
Solution 2(future): A PR to fix it is already merged
Wait for the next release, which includes the fix in Bump kubebuilder release 3.6.0, upgrade kustomize and add support for Apple Silicon #5965 that was merged on 2022/08/12.
Related Discussions on GitHub
- https://github.com/kubernetes-sigs/kustomize/issues/4612
- https://github.com/operator-framework/operator-sdk/issues/5785
- https://github.com/operator-framework/operator-sdk/pull/5965
- https://github.com/kubernetes-sigs/kustomize/issues/4612#issuecomment-1119864853
- https://github.com/kubernetes-sigs/kustomize/releases/tag/kustomize%2Fv4.2.0