https://pulumi.com logo
#general
Title
# general
l

loud-whale-26029

02/18/2020, 4:12 PM
Hello Everyone, Im having an issue when trying to deploy a new HorizontalPodAutoscaler. we are using Aws EKS version 1.14.7. I have imported the library '@pulumi/kubernetes/autoscaling/v2beta2' and also at the class definition I stated the desired apiVersion ('autoscaling/v2beta2'). The deploy succeeded but when im examining the result, i notice that the apiVersion used is autoscaling/v1, But ... at the metadata section I can see that the last applied configurations gets the correct configuration. any suggestions on why it happens would be appreciated.
g

gorgeous-egg-16927

02/18/2020, 4:47 PM
That’s the way apiVersions work with Kubernetes. The resource was created with the apiVersion you specified, and then the k8s server will store that configuration in a common representation server-side. At that point, you can request that resource using any supported apiVersion, and it will auto-convert the stored configuration to the appropriate version for your request. You can see this behavior with
kubectl
by creating a Deployment and then trying both
kubectl get deployments.extensions -o yaml
and
kubectl get deployments.apps -o yaml
Pulumi will use the latest available apiVersion when it queries resource state.
l

loud-whale-26029

02/18/2020, 5:02 PM
But in my case I wanted to use the latest version of autoscaling/v2beta2, which is installed on our EKS. and also specifically requested that version.. but I got v1 deployed..
g

gorgeous-egg-16927

02/18/2020, 5:11 PM
Are you seeing an error somewhere? Perhaps I don’t understand your question.