Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant install VPA with Helm Configuration #5758

Closed
nikolic-milan opened this issue May 15, 2023 · 16 comments · Fixed by #5763
Closed

Cant install VPA with Helm Configuration #5758

nikolic-milan opened this issue May 15, 2023 · 16 comments · Fixed by #5763
Assignees
Labels
area/cluster-autoscaler area/helm-charts kind/bug Categorizes issue or PR as related to a bug. kind/documentation Categorizes issue or PR as related to documentation.

Comments

@nikolic-milan
Copy link

Which component are you using?: cluster-autoscaler

What version of the component are you using?:

Component version: Latest Version

What k8s version are you using (kubectl version)?: 1.25

kubectl version Output
$ kubectl version 
```Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.2", GitCommit:"5835544ca568b757a8ecae5c153f317e5736700e", GitTreeState:"clean", BuildDate:"2022-09-21T14:33:49Z", GoVersion:"go1.19.1", Compiler:"gc", Platform:"windows/amd64"}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:"1", Minor:"24+", GitVersion:"v1.24.10-eks-48e63af", GitCommit:"9176fb99b52f8d5ff73d67fea27f3a638f679f8a", GitTreeState:"clean", BuildDate:"2023-01-24T19:17:48Z", GoVersion:"go1.19.5", Compiler:"gc", Platform:"linux/amd64"}````

What environment is this in?: AWS EKS Kubernetes Version 1.24

What did you expect to happen?: I expected a successful installation of autoscaler and VPA

What happened instead?: I got the fallowing error
unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "VerticalPodAutoscaler" in version "autoscaling.k8s.io/v1"\n

How to reproduce it (as minimally and precisely as possible): I used the fallowing code with aws_cdk

cluster.add_helm_chart('cluster-autoscaler',
            repository="https://kubernetes.github.io/autoscaler",
            chart="cluster-autoscaler",      
            release="edge-cluster-autoscaler",
            namespace="kube-system",
            values={
                "autoDiscovery": {
                    "clusterName": "EdgeCluster"
                },
                "awsRegion": "eu-central-1",
                "vpa": {
                    "enabled": True,
                    "containerPolicy": {
                        "minAllowed": {
                            "cpu": "20m",
                            "memory": "50Mi"
                        }
                    }
                }
            }        
        )

Anything else we need to know?: Without the VPA configuration, autoscaler installs.

@nikolic-milan nikolic-milan added the kind/bug Categorizes issue or PR as related to a bug. label May 15, 2023
@Shubham82
Copy link
Contributor

Hi @nikolic-milan
JFYI: The Helm charts currently install Cluster Autoscaler only not VPA.
https://github.com/kubernetes/autoscaler/tree/master/charts

@nikolic-milan
Copy link
Author

nikolic-milan commented May 16, 2023

Hi @Shubham82, thank you for your answer!
I assumed it was since it's documented as such.
https://github.com/kubernetes/autoscaler/tree/master/charts/cluster-autoscaler#verticalpodautoscaler

@Shubham82
Copy link
Contributor

I'm sorry, we can install the VPA, but it is for cluster Autoscaler,
Here is the PR which adds this feature: #5558

The error you are facing is due to the version you are using. This feature was merged in CA v1.27 so you should use CA v12.7 and the corresponding k8s version i.e. k8s v1.27.

@Shubham82
Copy link
Contributor

Hi @gjtempleton and @voelzmo, is anything I missed here? PTAL!

@nikolic-milan
Copy link
Author

I'm sorry, we can install the VPA, but it is for cluster Autoscaler, Here is the PR which adds this feature: #5558

The error you are facing is due to the version you are using. This feature was merged in CA v1.27 so you should use CA v12.7 and the corresponding k8s version i.e. k8s v1.27.

AWS EKS currently support Kubernetes up to version 1.26. Would that be a high enough version?
I tried just changing the cluster-autoscaler version to v1.27.0 but I still get the same error.

@Shubham82
Copy link
Contributor

I think it is due to the EKS version.
see this: https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler#releases

@nikolic-milan
Copy link
Author

I'll try and update my cluster to v1.26 since it's the latest supported version by AWS EKS.
For the CA version, are you sure it's added in v1.27.0?
The documentation only mentions up to version 1.26.
https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler#releases

@Shubham82
Copy link
Contributor

For the CA version, are you sure it's added in v1.27.0?

Yes, it was added in CA v1.27.
Please see the CA-1.27 branch: https://github.com/kubernetes/autoscaler/tree/cluster-autoscaler-release-1.27/charts/cluster-autoscaler
and CA-1.26 branch: https://github.com/kubernetes/autoscaler/tree/cluster-autoscaler-release-1.26/charts/cluster-autoscaler

The documentation only mentions up to version 1.26.
https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler#releases

This is only to mention CA compatibility with k8s. i.e. minor release of the CA to the minor release of k8s.

@gjtempleton
Copy link
Member

Sorry, this is slightly confusing and due to the fact we publish multiple projects from the same repo, it's not related to the CA version.

The CA helm chart now gives the option to install a VPA object to scale the CA as appropriate, however, you need to have already installed the VPA to the cluster separately. We could obviously do with improving the docs around this to make this clearer.

@Shubham82
Copy link
Contributor

Thanks, @gjtempleton for the above information.

But to use this feature we should have CA-1.27, am I right?

The CA helm chart now gives the option to install a VPA object to scale the CA as appropriate, however, you need to have already installed the VPA to the cluster separately. We could obviously do with improving the docs around this to make this clearer.

We can modify/add this thing to VPA content under README.
Do you think some other place where we can add this?

@Shubham82
Copy link
Contributor

/kind documentation

@k8s-ci-robot k8s-ci-robot added the kind/documentation Categorizes issue or PR as related to documentation. label May 16, 2023
@gjtempleton
Copy link
Member

No, it's unrelated to the version of the CA, it should work with any version of the CA as it's not related to CA code, it's just a helm chart feature, available in any release of the chart from 9.27.0 onwards.

@Shubham82
Copy link
Contributor

No, it's unrelated to the version of the CA, it should work with any version of the CA as it's not related to CA code, it's just a helm chart feature, available in any release of the chart from 9.27.0 onwards.

I have checked it, you are right I missed it. It makes sense thanks for the clarification.

@Shubham82
Copy link
Contributor

Shubham82 commented May 16, 2023

The CA helm chart now gives the option to install a VPA object to scale the CA as appropriate, however, you need to have already installed the VPA to the cluster separately. We could obviously do with improving the docs around this to make this clearer.

We can modify/add this thing to VPA content under README. Do you think some other place where we can add this?

@gjtempleton, Your thoughts on this?

@Shubham82
Copy link
Contributor

I'm up for it.
/assign

@Shubham82
Copy link
Contributor

Fixed it here: #5763
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cluster-autoscaler area/helm-charts kind/bug Categorizes issue or PR as related to a bug. kind/documentation Categorizes issue or PR as related to documentation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants