0

I am new to Kubernetes, I know there are multiple ways to log collection. but I am specifically asking about my scenario. we have a Syslog xyz.com port 8090. now we want our pods to send logs to our server xyz.com. what is the best way to achieve this? is there any centralize way of customizing logs from all deployment pods, or should we have to configure rsyslog service in a container and rebuild the container? or any best practice that you guys can suggest.

Thanks, Yousuf

1
  • The documentation is a good place to start with questions about centralized logging. Commented Apr 18, 2023 at 9:50

1 Answer 1

1

Refer to Sudheer Chamarthi’s Medium Blog Published in ITNEXT Run Rsyslog server in Kubernetes and follow below steps to stream logs in Syslog server :

  1. Build and Push your image to Docker Registry
  2. Create Separate Namespace
  3. Create Persistent storage
  4. Create Rsyslog Deployment
  5. Expose deployment to service
  6. Expose service to NLB
  7. Do Testing & Scaling

You can have a look at the Github archive on Logging Architecturkubernetes-rsyslog-logging that provides kubernetes configuration to establish a centralized logging solution. You can have a glance at John Starich’s tutorial on Kubernetes Log Forwarding with Syslog.

As @ larsks mentioned in the comment, Using a sidecar container with the logging agent is widely used. It is application independent, making it a much more flexible solution and note it can be implemented in 2 different ways.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.