ingress-nginx: Unable to write event when scope set to other namespace then install namespace
the controller is unable to write events in the scope.namespace, probably because it uses a Role that is bound to the install namespace:
Unable to write event ... can't create an event with namespace 'ingress' in namespace 'istio-system'
NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):
NGINX Ingress controller
Release: v1.1.2
Build: bab0fbab0c1a7c3641bd379f27857113d574d904
Repository: https://github.com/kubernetes/ingress-nginx
nginx version: nginx/1.19.9
Kubernetes version (use kubectl version):
1.21
Environment:
- Cloud provider or hardware configuration: Azure AKS
- OS (e.g. from /etc/os-release):
- Kernel (e.g.
uname -a): - Install tools:
Please mention how/where was the cluster created like kubeadm/kops/minikube/kind etc.
- Basic cluster related info:
kubectl version:
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.2", GitCommit:"092fbfbf53427de67cac1e9fa54aaa09a28371d7", GitTreeState:"clean", BuildDate:"2021-06-16T12:52:14Z", GoVersion:"go1.16.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.9", GitCommit:"37f338aa38e0427e127162afe462e2f4150f0ba3", GitTreeState:"clean", BuildDate:"2022-02-07T20:49:26Z", GoVersion:"go1.16.12", Compiler:"gc", Platform:"linux/amd64"}
-
kubectl get nodes -o wide -
How was the ingress-nginx-controller installed:
-
helm
- If helm was used then please show output of
helm ls -A | grep -i ingress:
- If helm was used then please show output of
ingress-nginx ingress 7 2022-03-15 10:54:05.0103438 +0000 UTC deployed ingress-nginx-4.0.18 1.1.2
What happened:
Logs show the error
What you expected to happen:
No such error in log
How to reproduce it:
set
scope:
enabled: true
namespace: ...
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 15 (5 by maintainers)
According to this link I can change the behavior of the controller to look for Ingresses in a specific namespace. To do this I must add the flag
--watch-namespace=othernamespaceto the nginx deployment arguments.Once added, patched the deployment manifest, I’m facing the error
Unable to write event ... can't create an event with namespace 'ingress-nginx' in namespace 'othernamespace'.