I have implemented Liveness Probe in C# based Kubernetes Application. When I am removing InitialDelaySeconds in my livenessconfig (at code level using Kubernetes Client's V1Probe):
IList<string> command = new List<string>();
V1Probe livenessconfig = null;
command.Add("curl");
command.Add("- f");
command.Add("http://localhost:5000/checkhealth/");
V1ExecAction execommand = new V1ExecAction(command);
livenessconfig = new V1Probe { Exec = execommand, PeriodSeconds = 10};
then I am seeing Liveness Probe failing in Pod description(no reason is mentioned though):
Normal Created 26s kubelet Created container App-prox
Normal Started 26s kubelet Started container App-prox
Warning Unhealthy 6s (x2 over 16s) kubelet Liveness probe failed:
Normal Killing 6s kubelet Stopping container App-prox
I don't want to give any initialdelay to my probe and want my probe to start executing command as soon as container is up. How should I manage this?