Giter VIP home page Giter VIP logo

Comments (2)

jvassev avatar jvassev commented on June 14, 2024

Hi @lemaral,

The recommended way to do so is at the kube-system namespace level. It is not processed/validated so there you can tail arbitrary log files in /var/log (any folder indeed but the /var/log is already mounted on the pod so less work for you).

I recommend you enable json-formatted audit logs. Then add this to the kube-system's config-map:

<source>
  @type tail
  multiline_flush_interval 5s
  path /var/log/kube-apiserver-audit.log
  pos_file /var/log/xxxxx # it's important you pick a location under /var/log/
  tag k8s.audit

  <parse>
    @type       json
    time_key    timestamp
    time_format %iso8601
  </parse>
</source>

Then you can <match k8s.audit> and send your logs to an external log aggregator.

from kube-fluentd-operator.

lemaral avatar lemaral commented on June 14, 2024

Hi @jvassev
This works perfectly :)
Thank you very much for log-router and the detailed answer.

from kube-fluentd-operator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.