unknown field "behavior" in io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerSpec;
viju2008 opened this issue · 1 comments
Kubectl Version
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.2", GitCommit:"f5743093fd1c663cb0cbc89748f730662345d44d", GitTreeState:"clean", BuildDate:"2020-09-16T13:41:02Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.9", GitCommit:"65bea96239d3fa3dc1d00f3407041719fc736fce", GitTreeState:"clean", BuildDate:"2020-07-30T12:20:29Z", GoVersion:"go1.13.9 BoringCrypto", Compiler:"gc", Platform:"linux/amd64"}.
Error when applying
kubectl create -f manifests/hpa.yaml
error: error validating "manifests/hpa.yaml": error validating data: ValidationError(HorizontalPodAutoscaler.spec): unknown field "behavior" in io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerSpec; if you choose to ignore these errors, turn validation off with --validate=false
The behaviour
section of the Autoscaler
spec was introduced in K8s 1.18 and is not compatible with k8s 1.17 that you are using. The Autoscaler example doc has been updated to state this compatibility issue.