Answers to Kubernetes questions you did not dare to ask.
Bazel rules for k8s
It would be nice to catch validation errors as part of a template generation unit test suite rather than wait until deploy time to find out you have a malformed template.
Doesn't even validate, so what's the point?
The advice is to run more than one replica using some affinity definition to ensure the replicas do not land in the same node.
spec: affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: app operator: In values: - ingress-nginx topologyKey: kubernetes.io/hostname
the reason is simple: you don't need a high number of NGINX instances to handle high volumes of traffic and most importantly, you need to keep in mind that each instance of the ingress controller needs to reach the kubernetes API server. This means if you have lots of replicas, you are putting (unnecessary) pressure. Using a deployment with an anti-affinity rule to avoid multiple replicas in the same node is, in most of the cases, more than enough.
Pain(less) NGINX Ingress – Daniel Martins