Open sthetz opened 6 years ago
I found out that to avoid creating host: localhost
line in Kubernetes config I have to simply remove the host from Short config, like this:
liveness_probe:
delay: 15
net:
url: HTTP://:3000/status/online
Glad it worked out! Feel free to add any other issues if you face them!
The issue you've mentioned should be fixed, since it deviates from kube-api spec. I'll reopen it so that we can track it.
Hello!
After converting my Kubernetes configs into Short format I noticed that my container with a Rails web app started failing liveness/readiness checks. Quick investigation revealed that the problem is default value of
host
inhttpGet
.Here is the probe part of the original Kubernetes config:
When run through Short, it translates into this:
Which in turn (when translated back into Kubernetes format) translates into this:
So, Short adds explicit param
host
which defaults tolocalhost
. However, Kubernetes documentation on probes states that thehost
param inhttpGet
defaults to pod's internal IP. So when liveness probe tries to accesslocalhost
instead of pod's IP, the probe fails.