Hello Everyone, Im having an issue when trying to ...
# general
l
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
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
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
Are you seeing an error somewhere? Perhaps I don’t understand your question.