<p>I want to deploy a VerticalPodAutoscaler but i get this error: </p>

<blockquote>
  <p>error: unable to recognize "scaleCPUVertical.yaml": no matches for
  kind "VerticalPodAutoscaler" in version "autoscaling.k8s.io/v1beta2"</p>
</blockquote>

<pre><code>apiVersion: autoscaling.k8s.io/v1beta2
kind: VerticalPodAutoscaler
metadata:
  name: test1
  namespace: default
spec:
  targetRef:
    apiVersion: "extensions/v1beta1"
    kind:       Deployment
    name:       test1
  updatePolicy:
    updateMode: "Off"
</code></pre>

Java
<p>If you are using <a href="https://cloud.google.com/" rel="nofollow noreferrer">GCP</a> as your cloud platform you can follow the guide <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/vertical-pod-autoscaling" rel="nofollow noreferrer">Configuring vertical pod autoscaling</a>, which describes how to create a Kubernetes cluster with <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/verticalpodautoscaler" rel="nofollow noreferrer">Vertical Pod Autoscaling</a> enabled.</p>

<p>You should set the desired zone and region, once this is done you can use following command:</p>

<pre><code>gcloud beta container clusters create [CLUSTER_NAME] --enable-vertical-pod-autoscaling
</code></pre>

<p>This will create a new Kubernetes cluster with Vertical Pod Autoscaling enabled and ready to use.</p>

<p>You can also enable it on already running cluster by using the following command:</p>

<pre><code>gcloud beta container clusters update [CLUSTER-NAME] --enable-vertical-pod-autoscaling
</code></pre>

<p>If you are using <strong>AWS</strong> as your cloud provide or Kubernetes on-premise you can follow <a href="https://docs.aws.amazon.com/eks/latest/userguide/vertical-pod-autoscaler.html" rel="nofollow noreferrer">Deploy the Vertical Pod Autoscaler</a>. Which describes how to clone the <a href="https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler" rel="nofollow noreferrer">Vertical Pod Autoscaler</a> repository and how to deploy it.</p>
