kubernetesminikubekubeflow

HorizontalPodAutoscaler not found on minikube when installing kubeflow


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 v2betato v2and 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.


Solution

  • 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.