kudo icon indicating copy to clipboard operation
kudo copied to clipboard

error: unable to recognize "kudo.yaml": no matches for kind "MutatingWebhookConfiguration" in version "admissionregistration.k8s.io/v1beta1"

Open suikast42 opened this issue 3 years ago • 5 comments

What happened: The suggested init brings the error "error: unable to recognize "kudo.yaml": no matches for kind "MutatingWebhookConfiguration" in version "admissionregistration.k8s.io/v1beta1"

How to reproduce it (as minimally and precisely as possible): $ kubectl kudo init --dry-run -o=yaml > kudo.yaml $ kubectl apply -f kudo.yaml

Anything else we need to know?: I look at extensible-admission-controllers and replace line 531 of the kudo.yaml with apiVersion: admissionregistration.k8s.io/v1 and add admissionReviewVersions: ["v1", "v1beta1"] to client config of that resource. After that I see no issues if I apply the kudo.yaml

Environment:

  • Kubernetes version (use kubectl version):v1.22.2+k3s2"
  • Kudo version (use kubectl kudo version): 0.19.0
  • Operator:
  • operatorVersion:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

suikast42 avatar Oct 18 '21 11:10 suikast42

I do a downgrade to kubernetes version 1.21.5 and see the warning . But the issue is gone Warning: admissionregistration.k8s.io/v1beta1 MutatingWebhookConfiguration is deprecated in v1.16+, unavailable in v1.22+; use admissionregistration.k8s.io/v1 MutatingWebhookConfiguration

I assume there is some stuff in kudo code that relies on the beata version.

suikast42 avatar Oct 22 '21 13:10 suikast42

We are running into the same issue now. KUDO v0.19.0 will not init on a Kubernetes cluster running v1.22+.

Just wondering if there will be future releases of KUDO to address this?

dboyleitrs avatar Nov 10 '21 14:11 dboyleitrs

We are running into the same issue now. KUDO v0.19.0 will not init on a Kubernetes cluster running v1.22+.

I try to build kudo from source but I failed with this. There is no entrypoint which explains build from source. The reason why it's not working with 1.22+ ist hat the api admissionregistration.k8s.io/v1beta1 is removed from kubernetes. You have to use admissionregistration.k8s.io/v1. Accorrding to k8s it should not be hard to migrate

suikast42 avatar Nov 11 '21 19:11 suikast42

this is related to https://github.com/kudobuilder/kudo/issues/1807 . you might need to change admission version to v1

dove-young avatar Jun 01 '22 03:06 dove-young

It's a known issue. There are two K8s apis (if I remembered correctly) where v1beta1 was deprecated and now removed in 1.22. I've been working on the required changes plus some other dependency updates here: https://github.com/oneidentity/kudo/tree/feature/go118_dependency_update

It's mostly done. That branch builds locally and can deploy into 1.22+ clusters.

There are a couple of related but older PRs from @kensipe here: #1799 #1805 #1806

My hope is to finish it up this week and have a possible PR that would encapsulate all the work in those other three PRs, some additional dependency updates, and all the test fixes that come with that.

But as I'm not a core committer, I'm not sure what the status will be with getting it merged and a new release. For our own purposes we may end up building it ourselves and running our built version until it's resolved in the core project.

dbarentine avatar Jun 20 '22 23:06 dbarentine