<p>I followed the <a href="https://knative.dev/docs/install/yaml-install/serving/install-serving-with-yaml/" rel="nofollow noreferrer">official instruction</a> to installing knative serving on a self-built k8s cluster. But when running the second line</p>
<pre><code>kubectl apply -f https://github.com/knative/serving/releases/download/knative-v1.9.2/serving-core.yaml
</code></pre>
<p>I got</p>
<pre><code>unable to recognize &quot;https://github.com/knative/serving/releases/download/knative-v1.9.2/serving-core.yaml&quot;: no matches for kind &quot;HorizontalPodAutoscaler&quot; in version &quot;autoscaling/v2&quot;
unable to recognize &quot;https://github.com/knative/serving/releases/download/knative-v1.9.2/serving-core.yaml&quot;: no matches for kind &quot;HorizontalPodAutoscaler&quot; in version &quot;autoscaling/v2&quot;
</code></pre>
<p>I searched for similar errors, but found few things helpful.</p>
<p>My k8s cluster is built on two virtualbox VMs, one as the master node and one as the worker node. Both with:</p>
<ul>
<li>ubuntu 22.04</li>
<li>docker version 20.10</li>
<li>k8s version 1.21.14</li>
</ul>
<p>Here are the custom resources I got after running the first line.</p>
<pre><code>$ kubectl apply -f https://github.com/knative/serving/releases/download/knative-v1.9.2/serving-crds.yaml
customresourcedefinition.apiextensions.k8s.io/certificates.networking.internal.knative.dev created
customresourcedefinition.apiextensions.k8s.io/configurations.serving.knative.dev created
customresourcedefinition.apiextensions.k8s.io/clusterdomainclaims.networking.internal.knative.dev created
customresourcedefinition.apiextensions.k8s.io/domainmappings.serving.knative.dev created
customresourcedefinition.apiextensions.k8s.io/ingresses.networking.internal.knative.dev created
customresourcedefinition.apiextensions.k8s.io/metrics.autoscaling.internal.knative.dev created
customresourcedefinition.apiextensions.k8s.io/podautoscalers.autoscaling.internal.knative.dev created
customresourcedefinition.apiextensions.k8s.io/revisions.serving.knative.dev created
customresourcedefinition.apiextensions.k8s.io/routes.serving.knative.dev created
customresourcedefinition.apiextensions.k8s.io/serverlessservices.networking.internal.knative.dev created
customresourcedefinition.apiextensions.k8s.io/services.serving.knative.dev created
customresourcedefinition.apiextensions.k8s.io/images.caching.internal.knative.dev created
$ kubectl get crd
NAME                                                  CREATED AT
certificates.networking.internal.knative.dev          2023-03-03T01:09:49Z
clusterdomainclaims.networking.internal.knative.dev   2023-03-03T01:09:49Z
configurations.serving.knative.dev                    2023-03-03T01:09:49Z
domainmappings.serving.knative.dev                    2023-03-03T01:09:49Z
images.caching.internal.knative.dev                   2023-03-03T01:09:50Z
ingresses.networking.internal.knative.dev             2023-03-03T01:09:49Z
metrics.autoscaling.internal.knative.dev              2023-03-03T01:09:50Z
podautoscalers.autoscaling.internal.knative.dev       2023-03-03T01:09:50Z
revisions.serving.knative.dev                         2023-03-03T01:09:50Z
routes.serving.knative.dev                            2023-03-03T01:09:50Z
serverlessservices.networking.internal.knative.dev    2023-03-03T01:09:50Z
services.serving.knative.dev                          2023-03-03T01:09:50Z
</code></pre>
<p>All I have done are these two lines of commands</p>
<pre><code>$ kubectl apply -f https://github.com/knative/serving/releases/download/knative-v1.9.2/serving-crds.yaml
$ kubectl apply -f https://github.com/knative/serving/releases/download/knative-v1.9.2/serving-core.yaml
</code></pre>
<p>I am new to k8s custom resources and knative. Thanks in advance for any help.</p>

Lyudmila Sun
<p>I believe Knative 1.9 requires Kubernetes 1.23 or newer.  One of the changes that happened in the last year or so was the removal of the <code>v2beta2</code> autoscaling API and replacement with <code>v2</code> API. I believe the new API is present in Kubernetes 1.22, but Knative 1.9 was tested with the community supported versions as of January, which includes 1.26, 1.25, 1.24 and possibly 1.23.</p>
