Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

303
Visualizações
Limit logs in kubernetes

I'm running into issues because my containers are producing too much log output. This apparently causes the reserved space to run out and evicts the pods with message The node was low on resource: ephemeral-storage. Container XYZ was using 1412Ki, which exceeds its request of 0.

Is there any way to tell kubernetes to just forget about old logs? I would be perfectly fine with saying "10MB of logs per pod are more than enough", but I can't find any place to specify such a thing.

Whether this is a limit in time or size does not matter to me that much, as long as I can keep my pods alive. This is for a development environment, so log retention is not crucial at all.

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

I'm assuming the container engine is docker in which case, you can configure docker to limit the logs written by your pod(s) container(s).

https://docs.docker.com/config/containers/logging/configure/

over 4 years ago · Santiago Trujillo Relatório

0

This is a Community Wiki answer so feel free to edit it and add any additional details you consider important.

As William has already answered this question, I'm only going to add a few details to make this more complete.

Please take a look at Logging Architecture in the official kubernetes docs. As you can read here "Kubernetes currently is not responsible for rotating logs, but rather a deployment tool should set up a solution to address that."

If your container runtime happens to be docker, you can set up your log rotation policy by editing/creating:

/etc/docker/daemon.json

(on Linux host)

or:

C:\ProgramData\docker\config\daemon.json

(on Windows host)

which may look as follows:

{
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "10m",
    "max-file": "3",
    "labels": "production_status",
    "env": "os,customer"
  }
}
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda