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

Masato Naka
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

  1. operator-sdk uses kustomize v3.8.7 by default.
  2. kustomize uses goreleaser.
  3. goreleaser supported darwin/arm64 in v0.156.0
  4. 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

  1. https://github.com/kubernetes-sigs/kustomize/issues/4612
  2. https://github.com/operator-framework/operator-sdk/issues/5785
  3. https://github.com/operator-framework/operator-sdk/pull/5965
  4. https://github.com/kubernetes-sigs/kustomize/issues/4612#issuecomment-1119864853
  5. https://github.com/kubernetes-sigs/kustomize/releases/tag/kustomize%2Fv4.2.0

--

--

Masato Naka
Masato Naka

Written by Masato Naka

An SRE, mainly working on Kubernetes. CKA (Feb 2021). His Interests include Cloud-Native application development, and machine learning.

No responses yet