<p>Hello I'am new on K8S and react typescript app,
I'am trying to deploy my react application with typescript, i have an error in Kubernetes deployment</p>
<pre><code>Liveness probe failed: HTTP probe failed with statuscode: 404
</code></pre>
<p>where should I put the well-known routes /.well-known/live and /.well-known/ready ? and what should I write for it ?</p>

<blockquote>
<p>where should I put the well-known routes /.well-known/live and
/.well-known/ready ? and what should I write for it ?</p>
</blockquote>
<p>No need for it if you are serving index from your container with Nginx/Apache it will work in that case you need to update the K8s YAML config and update <code>HTTP probe</code> path to just <code>/</code> probaly so when K8s check it's hit to <code>root(index.html)</code> main page of your react app.</p>
<p><strong>Ways to mitigate</strong></p>
<blockquote>
<p>Liveness probe failed: HTTP probe failed with statuscode: 404</p>
</blockquote>
<p>This clearly means <strong>Kubernetes</strong> failed to verify or check the health of deployment in K8s.</p>
<p>in your error status code is : <strong>404</strong></p>
<p>which means it was not able to get or hit the <strong>HTTP</strong> endpoint.</p>
<p>i am not sure how your route works and application is configured however this is the simplest HTTP option you could use.</p>
<pre><code>app.get('/live',(req,res)=&gt; {
  res.send (&quot;OK&quot;);
}); 
</code></pre>
<p>K8s periodically check the HTTP status on this endpoint that you have configured using YAML config file.</p>
<p><strong>Nginx checks</strong></p>
<p>If you are deploying the separate <strong>Frontend</strong> pod and can not keep <strong>HTTP endpoint</strong> in container</p>
<p>You can use the default endpoint of <code>Apache/Nginx</code> as liveness probe just like <code>/</code> so by default <strong>Nginx</strong> or <strong>Apache</strong> <code>return 200</code> on <code>/</code></p>
<p><strong>Or else</strong></p>
<p>you can also give any HTML file name from your code, <code>/index-live.html</code> so when K8s will check <code>/live</code> endpoint frontend container will serve html file with status code <strong>200</strong>.</p>
