Kubernetes cluster working but getting this error from the NGINX controller

4/7/2020

Although the cluster is working as expected this error is somewhat troublesome.

Kubernetes Version: v1.17.3

E0407 17:57:54.426952 1 reflector.go:123] github.com/nginxinc/kubernetes-ingress/nginx-ingress/internal/k8s/controller.go:341: Failed to list *v1.VirtualServerRoute: virtualserverroutes.k8s.nginx.org is forbidden: User "system:serviceaccount:kube-system:default" cannot list resource "virtualserverroutes" in API group "k8s.nginx.org" at the cluster scope

-- Daniel Maldonado
kubernetes
kubernetes-ingress

1 Answer

4/8/2020

To fix the problem you have to disable list/watch operations on virtualserver and virtualserverroutes - set the --enable-custom-resources flag to false in your deployment/daemonset manifest.

--enable-custom-resources
Enables custom resources (default true)

Take a look also at: nginx-ingress-controller-configuration, disabling-list-watch-virtualserver.

-- MaggieO
Source: StackOverflow