With Kubernetes 1.22, the beta API for the CustomResourceDefinition apiextensions.k8s.io/v1beta1 was removed and replaced with apiextensions.k8s.io/v1. While changing the CRDs, I have come to realize that my older controller(operator pattern, originally written for v1alpha1) still tries to list apiextensions.k8s.io/v1alpha1 even though I have changed the CRD to apiextensions.k8s.io/v1.
I have read no matches for kind "Deployment" in version "extensions/v1beta1" and it states that for deployment, I should change the API version but my case is an extension of this since I dont have the controller for the new API.
Do I need to write a new controller for the new API version ?
CodePudding user response:
Do I need to write a new controller for the new API version ?
Unfortunately, it looks like it does. If you are unable to apply what is described in this similar question, because you are using a custom controller then you need to create your own new controller (if you cannot change API inside it) that will work with the supported API. Look at Custom controllers page in the official documentation.
I am not sure if the controller can manage the new API version. Even after changing the API version of the CRD to v1 from v1Alpha1, I get an error message stating that tha controller is trying to list CRD with API version v1alpha1.
It looks like the controller has some bugs. There should be no problem referencing the new API as written [in this documentation](It looks like the controller is badly written. There should be no problem referencing the new API as written in this documentation.):
The v1.22 release will stop serving the following deprecated API versions in favor of newer and more stable API versions:
- Ingress in the extensions/v1beta1 API version will no longer be served
- Migrate to use the networking.k8s.io/v1beta1 API version, available since v1.14. >Existing persisted data can be retrieved/updated via the new version.
Kubernetes 1.16 is due to be released in September 2019, so be sure to audit your configuration and integrations now!
- Change YAML files to reference the newer APIs
- Update custom integrations and controllers to call the newer APIs
- Update third party tools (ingress controllers, continuous delivery systems) to call the newer APIs
See also Kubernetes API and Feature Removals In 1.22: Here’s What You Need To Know.