Excluding containers from the Replicated historical log archives

Replicated collects historical container logs in the /var/lib/replicated-operator/logs directory. These logs can be quite helpful for debugging purposes and are included in the Support Bundle. There may be reasons to exclude these logs for certain containers. Adding the label com.replicated.excludelogs=true to the container will tell Replicated not to collect these logs. Below are some examples for each scheduler.

Swarm

services:
  web:
    image: web
    labels:
      com.replicated.excludelogs: "true"

Native

- name: Web
  containers:
  - source: public
    image_name: web
    version: latest
    labels:
    - "com.replicated.excludelogs=true"

Kubernetes

  • unsupported at this time