<p>I'm seeing a lot of restarts on all the pods of every service that I have deployed on Kubernetes.</p>
<p>But when I see the logs in real time:</p>
<pre><code>kubectl -n my-namespace logs -c my-pod -f my-pod-some-hash --tail=50
</code></pre>
<p>I see nothing, there's no restarts, there's no signal of failure. Readiness keep workings. So what it means all those restarts? Where or how can I get more info about those restarts?</p>
<p><a href="https://i.stack.imgur.com/HhAm1.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HhAm1.jpg" alt="enter image description here" /></a></p>
<p>Edit:</p>
<p>By viewing the pod details of the pod that has 158 on the picture above, I can see this, but I don't know what it means or if it's related to the restarts:</p>
<p><a href="https://i.stack.imgur.com/O2vTk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/O2vTk.png" alt="enter image description here" /></a></p>

pmiranda
<p><strong>Replication via one sample example pod with CLI commands</strong></p>
<p>If any pod restarts, in order to check the logs of the previous run user &quot;<strong>--previous</strong>&quot;</p>
<p>Step1:
Connect to cluster using below command</p>
<pre><code>az aks get-credentials --resource-group &lt;resourcegroupname&gt; --name &lt;Clustername&gt;
</code></pre>
<p>Step2:
verify the pod logs</p>
<pre><code>kubectl get pods
</code></pre>
<p><img src="https://i.stack.imgur.com/dwDYZ.png" alt="enter image description here" />
Step3:
Verify the restart pods logs using command</p>
<pre><code>kubectl logs &lt;PodName&gt; --previous
</code></pre>
<p><img src="https://i.stack.imgur.com/FLse0.png" alt="enter image description here" /></p>
