英文:
HorizontalPodAutoscaler not found on minikube when installing kubeflow
问题
我根据其网站(https://minikube.sigs.k8s.io/docs/start/)安装了最新版本的minikube:
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
安装的版本是:
chris@laptop1:~/tmp$ minikube version
minikube 版本:v1.30.1
提交:08896fd1dc362c097c925146c4a0d0dac715ace0
Kubernetes的版本如下:
chris@laptop1:~/tmp$ kubectl version --short
客户端版本:v1.27.3
Kustomize 版本:v5.0.1
服务器版本:v1.26.3
根据kubeflow文档(https://github.com/kubeflow/manifests#installation),我自己安装了所需的kustomize版本:
chris@laptop1:~/tmp$ kustomize version
v5.0.0
然而,在我安装kubeflow
时,出现了以下错误:
chris@laptop1:~/tmp/kubeflow/manifests$ while ! kustomize build example | awk '!/well-defined/' | kubectl apply -f -; do echo "重试应用资源"; sleep 10; done
# 警告:“patchesStrategicMerge”已弃用。请改用“patches”代替。运行“kustomize edit fix”以自动更新您的Kustomization。
... 大量已弃用的警告
validatingwebhookconfiguration.admissionregistration.k8s.io/validation.webhook.serving.knative.dev 已配置
错误:未找到名称为“webhook”命名空间为“knative-serving”的资源映射,来自“STDIN”:在版本“autoscaling/v2beta2”中找不到种类“HorizontalPodAutoscaler”
请确保首先安装CRDs
重试应用资源
在 common/knative/knative-serving/base/upstream/serving-core.yaml
中,HorizontalPodAutoscaler
有两个API版本:autoscaling/v2beta2
和 autoscaling/v2
。我将 v2beta
改为 v2
,然后成功安装了kubeflow。
我想知道为什么在kubeflow或其依赖项knative中会提到两个API版本。这只是一个错误吗,还是我漏掉了什么?
此外,我无法弄清如何解决这些已弃用的警告。
英文:
I installed the latest minikube version according to its website (https://minikube.sigs.k8s.io/docs/start/):
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
The version which was installed is:
chris@laptop1:~/tmp$ minikube version
minikube version: v1.30.1
commit: 08896fd1dc362c097c925146c4a0d0dac715ace0
The versions for kubernetes are as follows:
chris@laptop1:~/tmp$ kubectl version --short
Client Version: v1.27.3
Kustomize Version: v5.0.1
Server Version: v1.26.3
I installed kustomize by myself to the mentioned versions, as this is required according to the kubeflow documentation (https://github.com/kubeflow/manifests#installation):
chris@laptop1:~/tmp$ kustomize version
v5.0.0
However, when I installed kubeflow
, the following error was shown:
chris@laptop1:~/tmp/kubeflow/manifests$ while ! kustomize build example | awk '!/well-defined/' | kubectl apply -f -; do echo "Retrying to apply resources"; sleep 10; done
# Warning: 'patchesStrategicMerge' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically.
... lots of deprecated warnings
validatingwebhookconfiguration.admissionregistration.k8s.io/validation.webhook.serving.knative.dev configured
error: resource mapping not found for name: "webhook" namespace: "knative-serving" from "STDIN": no matches for kind "HorizontalPodAutoscaler" in version "autoscaling/v2beta2"
ensure CRDs are installed first
Retrying to apply resources
In common/knative/knative-serving/base/upstream/serving-core.yaml
there were two api versions for HorizontalPodAutoscaler
: autoscaling/v2beta2
and autoscaling/v2
. I changed v2beta
to v2
and then the installation of kubeflow completed.
I am wondering why there are two api versions mentioned in kubeflow, or its dependency knative. Is this simply a bug or am I missing something here?
Furthermore I could not figure out how to fix the deprecated warnings.
答案1
得分: 0
查看Kubernetes的发布说明时,我注意到以下内容:
HorizontalPodAutoscaler的autoscaling/v2beta2 API版本在v1.26中不再提供。
请将清单文件和API客户端迁移到autoscaling/v2 API版本,该版本从v1.23开始提供。
所有现有的持久化对象可通过新的API访问
v1.25
而Kubeflow的发布说明中提到,v1.7(当前最新版本)仅在v1.24和v1.25上经过验证。
所以,如果您想让Kubeflow按原样工作,看起来您可能需要尝试降级到minikube v1.25,否则您将需要对清单文件进行调整,直到新的Kubeflow版本发布。
实际上,这是一个Kubeflow的bug,在它们不断更新并支持新的K8s版本时需要修复。
英文:
Looking through the Kubernetes release notes I noticed this:
The autoscaling/v2beta2 API version of HorizontalPodAutoscaler is no longer served as of v1.26.
Migrate manifests and API clients to use the autoscaling/v2 API version, available since v1.23.
All existing persisted objects are accessible via the new API
v1.25
And the Kubeflow release notes are saying v1.7 (the current latest) is validated only on v1.24 and v1.25.
So it looks like you might want to try downgrading to minikkube v1.25 if you want to get Kubeflow to work as-is, otherwise you'll need to hack around with the manifests until a new Kubeflow comes out like you did.
This is in fact a Kubeflow bug that will need to be fixed as they roll forward and support newer K8s.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论