I have been getting alerts that a few APIs were deprecated in v1.22 of Kubernetes cluster in GCP and so I changed all of my deployments and nginx controllers to version apps/v1 and networking.k8s.io/v1 . But my cluster still shows that there are some components using the deprecated api's. The error on the pod is -
k8s.io/client-go@v0.18.6/tools/cache/reflector.go:125: Failed to list *v1beta1.Ingress: the server could not find the requested resource
The deprecated apis called are - API :
/apis/networking.k8s.io/v1beta1/ingresses
for user agent -
nginx-ingress-controller/v0.35.0 (linux/amd64) ingress-nginx/54ad65e32bcab32791ab18531a838d1c0f0811ef
and
/apis/networking.k8s.io/v1beta1/ingressclasses
for
nginx-ingress-controller/v0.35.0 (linux/amd64) ingress-nginx/54ad65e32bcab32791ab18531a838d1c0f0811ef
Today some of deployments were unable to reach from the browser, what changes do I need to make.
The root cause of the issue is that the NGINX Controller has to be compatible with the kubernetes version.
Follow resolutions steps below :
Check the version of NGINX.
Check Kubernetes version GKE console in GCP UI.
Confirm the supported versions with kubernetes here.
Update NGINX (change the API version of NGINX Ingress)
If NGINX was installed using Helm, its name will be ingress-nginx, and it can be upgraded using a helm command like below:
helm upgrade --reuse-values ingress-nginx ingress-nginx/ingress-nginx
You can also refer to the GCP official doc Upgrading third-party components and similar Github issue for relevant info, which may help to resolve your issue.