Kubernetes console pods logs to RAM instead Disk

10/15/2019

I'm planning for a very high speed applications on kubernetes ,but I encountering performance issues of the kubernetes pod console logs.

When some pod writing console log, he writes it to a file(disk) under the hood and rotates it.

How can I config kubernetes writes the console logs to the RAM instead (rotating aswell ofcourse and shows me the last XX number of logs).

-- Kfir Fersht
kubernetes

2 Answers

10/15/2019

This is up to your underlying nodes. If you want to put the logs on a ramdisk, then do that :) Kubernetes knows very little about log management, it mostly just connects all the pieces.

-- coderanger
Source: StackOverflow

10/15/2019

You should check emptyDir and set

emptyDir:
  medium: "Memory"

and then do whatever you need with your logs, or go with hostPath and use /dev/shm.

-- FL3SH
Source: StackOverflow