I am getting the following error in aws EKS version 16 .
Failed to install app test. Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(VerticalPodAutoscaler.spec): unknown field "labels" in io.k8s.autoscaling.v1.VerticalPodAutoscaler.spec
This is my yaml, And also I tried with apiVersion: autoscaling.k8s.io/v1beta2 but same error
---
apiVersion: "autoscaling.k8s.io/v1"
kind: VerticalPodAutoscaler
metadata:
name: web
spec:
labels:
app: web
targetRef:
apiVersion: "apps/v1"
kind: StatefulSet
name: web
updatePolicy:
updateMode: "Auto"
...
Error below literally sais you: there is no labels
objects in the autoscaling.k8s.io/v1
API. Each time you see such errors - you should refer to API spec, either to source code, either to kubectl explain
command to check what exact objects and fields you are able to use in each API version
In addition to source code you can check official documentation, e.g Vertical Pod autoscaling Reference to be sure you are using correct values.
Failed to install app test. Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(VerticalPodAutoscaler.spec): unknown field "labels" in io.k8s.autoscaling.v1.VerticalPodAutoscaler.spec
Also thanks @Kiran for provided code reference.
Check this repo .
Spec has only three field:
TargetRef, UpdatePolicy, ResourcePolicy
This is true for all three versions available autoscaling.k8s.io/v1 , autoscaling.k8s.io/v1beta1, autoscaling.k8s.io/v1beta2