Open Shuimo03 opened 1 year ago
同样遇到这个问题
我是这样解决的 go.mod文件 k8s.io/api v0.26.0 改成 k8s.io/api v0.26.1 然后修改Makefile 里的ENVTEST_K8S_VERSION = 1.26.0 改成 ENVTEST_K8S_VERSION = 1.25.0 就能正常make install 了 机器是MacBookpro14'(2021) M1 chip,使用插件--plugins=go/v4-alpha
kubectl version --short :
Client Version: v1.25.0 Kustomize Version: v4.5.7 Server Version: v1.25.0
@Shuimo03 可以参考一下我的解决方案
@Sucran 好咧,多谢大佬,最近没看了,到时候试试看
kubebuilder 版本用的3.8 可以,现在v3.9.0版本和kubernetes 1.25.0版本结合有报错
解决方法2,修改go.mod,加入replace k8s.io/api v0.26.0 => k8s.io/api v0.25.0定义,然后执行go mod tidy
参考https://github.com/kubernetes-sigs/kubebuilder/issues/3303.升级k8s.io/api即可 。 目前发现升级太高会引起其他问题,暂时升级为go get k8s.io/api@v0.26.1 ,go mod tidy.
我的代码:
我的环境
错误