Ingress, httprule and hostrule are not getting deployed with Error"Failed to watch *v1beta1.HTTPRule: failed to list *v1beta1.HTTPRule: the server could not find the requested resource"
search cancel

Ingress, httprule and hostrule are not getting deployed with Error"Failed to watch *v1beta1.HTTPRule: failed to list *v1beta1.HTTPRule: the server could not find the requested resource"

book

Article ID: 381275

calendar_today

Updated On:

Products

VMware Avi Load Balancer

Issue/Introduction

 Ingress, httprule and hostrule are not getting deployed after TKG upgrade.

Cause

After upgrading TKG, AKO pod also got upgraded however it was full of these log entries.


Logs from AKO Pod

ERROR   logr/logr.go:299        github.com/vmware/load-balancer-and-ingress-services-for-kubernetes/internal/k8s/controller.go:1455: Failed to watch *v1beta1.HTTPRule: failed to list *v1beta1.HTTPRule: the server could not find the requested resource (get httprules.ako.vmware.com)

ERROR   logr/logr.go:299        github.com/vmware/load-balancer-and-ingress-services-for-kubernetes/internal/k8s/controller.go:1436: Failed to watch *v1beta1.AviInfraSetting: failed to list *v1beta1.AviInfraSetting: the server could not find the requested resource (get aviinfrasettings.ako.vmware.com)

Note: The AKO upgrade does not automatically update the Custom Resource Definitions (CRDs)(Helm limitation), which may lead to related errors being observed post-upgrade.

Resolution

Please update the CRD using the following doc:

https://techdocs.broadcom.com/us/en/vmware-security-load-balancing/avi-load-balancer/avi-kubernetes-operator/1-13/avi-kubernetes-operator-guide-1-13/overview/install-avi-kubernetes-operator.html

Upgrade AKO section:

Helm does not upgrade the CRDs during a release upgrade. Before you upgrade a release, run the following command to upgrade the CRDs:

helm template oci://projects.registry.vmware.com/ako/helm-charts/ako --version <version> --include-crds --output-dir <output_dir>

This will save the helm files to an output directory which will contain the CRDs corresponding to the AKO version.

Install CRDs using:

kubectl apply -f <output_dir>/ako/crds/