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

CustomResourceDefinition problem with VPA #4897

Closed
VladimirBalun opened this issue May 18, 2022 · 9 comments · Fixed by #5050
Closed

CustomResourceDefinition problem with VPA #4897

VladimirBalun opened this issue May 18, 2022 · 9 comments · Fixed by #5050
Assignees
Labels
area/vertical-pod-autoscaler kind/bug Categorizes issue or PR as related to a bug.

Comments

@VladimirBalun
Copy link

Hello, I have the following problem:

resource mapping not found for name: "verticalpodautoscalers.autoscaling.k8s.io" namespace: "" from "STDIN": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1"                  
ensure CRDs are installed first                                                                                                                                                                                        
resource mapping not found for name: "verticalpodautoscalercheckpoints.autoscaling.k8s.io" namespace: "" from "STDIN": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1"        
ensure CRDs are installed first  

When I try to run ./hack/vpa-up.sh from tag vertical-pod-autoscaler/v0.9.2

@VladimirBalun VladimirBalun added the kind/bug Categorizes issue or PR as related to a bug. label May 18, 2022
@Shubham82
Copy link
Contributor

Hi @VladimirBalun

I tried this one, It is due to the apiextensions.k8s.io/v1beta1 being deprecated in k8sv1.16 and removed/unavailable in k8sv1.22.
see CustomResourceDefinitionand API removals for Kubernetes v1.22

so if you will try this one on k8sv1.21(from k8sv1.16) it shows the below warning when running ./hack/vpa-up.sh on vertical-pod-autoscaler/v0.9.2:

Warning: apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition

and from k8sv1.22 it shows below output when running ./hack/vpa-up.sh on vertical-pod-autoscaler/v0.9.2

resource mapping not found for name: "verticalpodautoscalers.autoscaling.k8s.io" namespace: "" from "STDIN": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1"
ensure CRDs are installed first
resource mapping not found for name: "verticalpodautoscalercheckpoints.autoscaling.k8s.io" namespace: "" from "STDIN": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1"
ensure CRDs are installed first

Which version you're using if it is k8sv1.22 or more then change it to the lower version.

@Shubham82
Copy link
Contributor

In VPA CRD apiextensions.k8s.io/v1beta1 migrated to v1 in vertical-pod-autoscaler-0.11.0
Have a look at this PR: #3606

@Shubham82
Copy link
Contributor

@jbartosik can we backport these changes to vertical-pod-autoscaler-0.9 and vertical-pod-autoscaler-0.10? is it valid to do that?
or if not backport so we can mention this thing under README vpa, which version of vpa used with k8s under compatibility.
WDYT?

@jbartosik
Copy link
Collaborator

@Shubham82 I think mention on compatibility is good. If you want to contribute a change then I'm happy to review it (if not I'll update it but it'll take me some time; please let me know)

I'm not sure about patching to 0.10 and 0.9. I have limited capacity and there are other things I think are more important for VPA (for example building new release when K8s 1.25 is released). If you think cherry picking that change into 0.10 and 0.9 is valuable please explain why (I think one could use a newer VPA but maybe there's a reason not to).

@Shubham82
Copy link
Contributor

Hi @jbartosik, Thanks for looking at it.

@Shubham82 I think mention on compatibility is good. If you want to contribute a change then I'm happy to review it (if not I'll update it but it'll take me some time; please let me know)

I'm up for it

@Shubham82
Copy link
Contributor

I'm not sure about patching to 0.10 and 0.9. I have limited capacity and there are other things I think are more important for VPA (for example building new release when K8s 1.25 is released). If you think cherry picking that change into 0.10 and 0.9 is valuable please explain why (I think one could use a newer VPA but maybe there's a reason not to).

Actually, I am thinking of the users who used the k8s latest version with VPA 0.9 and 0.10. but I agree with what you mentioned above (the user could use a newer VPA). so mentioned on the compatibility give more clarity on which version of VPA is used with k8s version.

@Shubham82
Copy link
Contributor

will open a PR soon.

@Shubham82
Copy link
Contributor

/assign

@Shubham82
Copy link
Contributor

Fixed it here: #5050

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

Successfully merging a pull request may close this issue.

3 participants