<p>I am using hybrid approach where in for few services I am using simple docker compose approach and for others I am using kubernetes for deployment. For both approaches I want to keep my centralized logging same ( fluentd ).
Here is my docker compose file ,</p>
<pre><code>version: &quot;2.1&quot;
services:
  inventory:
    image: SOME_SERVICE
    container_name: SOME_SERVICE
    network_mode: &quot;host&quot;
    expose:
      - &quot;80&quot;
    ports:
      - &quot;80:80&quot;
    mem_limit: 2000m
    oom_kill_disable: true
    logging: &amp;logging &lt;&lt;-- This Part
      driver: fluentd
      options:
       fluentd-address: IP:PORT
       tag: &quot;server.{{.Name}}&quot; 
</code></pre>
<p>I want convert this logging part to the equivalent kubernetes configuration. How can I do this ?</p>

TheAkashKamble
<p>There are no options to control logging in a <a href="https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/" rel="nofollow noreferrer">Pod spec</a>.  Instead, you need a cluster-wide log collector.  <a href="https://kubernetes.io/docs/concepts/cluster-administration/logging/" rel="nofollow noreferrer">Logging Architecture</a> in the Kubernetes documentation describes the setup.  As a programmer this isn't something you control, you'll have to ask your cluster administrator or your local DevOps team to configure it for you.</p>
