I want to disable istio readiness probe from doing health check.. on running service. Is there a way to disable http readiness probe and later enable it
Asked
Active
Viewed 4,501 times
4
-
Out of curiosity, the readiness probe is used to identify pod status changing from "starting" to "running", no? So does it make any sense to disable on something that is *already* running ? – Joel May 09 '19 at 19:40
-
there is some issue in envoy listener.. where health check is failing.. and sidecar container is not starting.. so i want to disable health check...to test my application....with sidecar proxy running.. hope it make sense.. – pappu_kutty May 09 '19 at 20:21
-
1I had a similar issue that I worked around by adding this annotation to my pods : `status.sidecar.istio.io/port: "0"`. But I'm not sure it would work on running pods. – Joel May 09 '19 at 20:31
-
@Joel.. it works.. but can you explain what is the issue... i have status.sidecar.istio.io/port: "80" , but health check was failing.. and my service pod listens in port 80.... – pappu_kutty May 09 '19 at 20:47
-
I'm not sure exactly what is going on, but I read that there: https://github.com/istio/istio/issues/9504#issuecomment-439432130 – Joel May 09 '19 at 21:01
-
Ok this atleast makes me move further.. No harm at this moment.. Since I am setting my app inbound ports in sidecar explicitly.. – pappu_kutty May 09 '19 at 21:25
-
I think for me the cause is that I'm exposing some ports without declaring them as containerPort ... doing that intentionally – Joel May 10 '19 at 05:52
-
@Joel, pls add this to the answer.. – pappu_kutty May 10 '19 at 06:59
-
for me i dont know.. i have two containers.. one is java app and another is react.. where as java app is working with health check.. and for react it is failing.. they have same configurations.... running in same namespace.. it should be bug... – pappu_kutty May 10 '19 at 07:01
1 Answers
5
Rewriting my comment as an answer as it seems to be a valid workaround for this issue:
You can add this annotation to the pods to disable probes on the istio-proxy containers:
status.sidecar.istio.io/port: "0"
The issue is being discussed on github, with more information: https://github.com/istio/istio/issues/9504#issuecomment-439432130
According to some comments there, it may happen when there's no service in front of some pods, or if some ports are exposed but not declared as containerPort, or in case of some labels mismatch between pods and services.

Joel
- 2,374
- 17
- 26