2 ms·
They send traffic to the Service that exposes your Pods, so yes, it only gets routed to Endpoints that work according to readiness tests.
by llarsson 7y ago
They send traffic to the Service that exposes your Pods, so yes, it only gets routed to Endpoints that work according to readiness tests.
- DelightOne 7y agohmm makes sense, thank you!
- rcconf 7y agoI remember seeing documentation on this a while ago, but I can't seem to find any documentation from nginx-ingress that talks about how nginx-ingress uses readinessprobe or livenessprobe. I was looking into this because if I have a pod with 3 containers, if 1 container wasn't running, nginx-ingress stopped serving traffic. I actually want to continue serving traffic if a certain container is still running, not all 3 running necessarily Do you know or have any documentation on how nginx-ingress actually does its readiness/liveness checks?
- xnxn 7y agoingress-nginx doesn't do readiness/liveness checks itself; the kubelet does[1]. If any of the containers in a Pod aren't ready, the endpoints controller[2] removes the Endpoint object corresponding to that Pod. ingress-nginx watches these Endpoints objects[3] to determine which Pods it should send traffic to. Edit: As to your use case, I think you should remove the readiness probe from that one container you don't care about. [1]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ https://kubernetes.io/docs/tasks/configure-pod-container/con... [2]: https://kubernetes.io/docs/concepts/overview/components/#kube-controller-manager https://kubernetes.io/docs/concepts/overview/components/#kub... [3]: https://kubernetes.github.io/ingress-nginx/user-guide/miscellaneous/#why-endpoints-and-not-services https://kubernetes.github.io/ingress-nginx/user-guide/miscel...
- llarsson 7y agoThird paragraph in the documentation says that a Pod as a whole is only considered ready if all containers are ready: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ https://kubernetes.io/docs/tasks/configure-pod-container/con...