1

I noticed that during the ingress-nginx pod creation/termination, there is a huge number of events created. Further "investigation" showed that each nginx pod creates

42s         Normal    Sync     ingress/name    Scheduled for sync 

event for each ingress objects.

For perspective, with some approximate imaginary numbers:

  • The moment you kubectl rollout restart ingress-nginx all ingress-nginx pods will terminate (not simultaneously as there is a proper PDB setup).
  • During restart, each pod will create sync event object for each ingress object in the cluster.
  • So if there are 100 ingress-nginx pods with 500 ingress objects, that will span 50k sync events.

I could not find any mentions about it in the docs/ingress-nginx issues

The question: is it expected behavior?

Wytrzymały Wiktor
  • 11,492
  • 5
  • 29
  • 37
Evedel
  • 653
  • 5
  • 18
  • 1
    Could you please provide with more details: what's done; logs; yaml file; nginx config file? There might be a misconfiguration, therefore your details will help to resolve your issue. Thanks – Bazhikov Oct 06 '21 at 12:06
  • Thanks a lot for your hint @Bazhikov. I was particularly hesitant to give the exact configuration of the ingress-nginx. As my main question here was not really about "how to fix it" but more "do people noticed the same `m*n` number of k8s sync events created" and if so "do you consider it a problem at all"? – Evedel Oct 07 '21 at 00:31

1 Answers1

1

This is expected behavior.

As we can see here, this is an informer, which creates the sync event for each valid ingress. In turn, this informer is added to the store on each ingress-controller pod, see more here.

Evedel
  • 653
  • 5
  • 18
Bazhikov
  • 765
  • 3
  • 11