<p>I am using a WordPress site build with Kubernetes deployment. In the deployment I have only one container pod.  Could you please clarify the possible reasons on the logs are not getting via kubectl logs command. I have tried docker logs on the container also, which is also showing the same output.</p>
<pre><code>#~$ kubectl logs -f &lt;pod_name&gt; -n &lt;namespace&gt;
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using xx.xx.xx.xx. Set the 'ServerName' directive globally to suppress this message
</code></pre>
<p>This is the only content in logs even after accessing the domain.</p>
<pre><code># docker logs -f &lt;k8s_container_name&gt;
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using xx.xx.xx.xx. Set the 'ServerName' directive globally to suppress this message
</code></pre>

Wellme
<p><code>kubectl logs</code> show the default <strong>STDOUT</strong> and <strong>STDERR</strong></p>
<p>You need to write the <code>file_put_contents('php://stderr', 'Your text goes to STDERR',FILE_APPEND);</code></p>
<p>at least append in file and you read from there or else if you developing php WordPress you can push logs to external logging also.</p>
<p>Read more at : <a href="https://www.php.net/manual/en/features.commandline.io-streams.php" rel="nofollow noreferrer">https://www.php.net/manual/en/features.commandline.io-streams.php</a> &amp; <a href="https://docs.docker.com/config/containers/logging/" rel="nofollow noreferrer">https://docs.docker.com/config/containers/logging/</a></p>
