How to not scrape logs from the specified pod to the promtail pod locally

Ex)
I don’t want the redash pod’s logs to be accumulated in the promtail pod’s “/var/log/pods/redash…/0.log”.

# Case 1
# [ ... ]
scrape_configs:
  - job_name: kubernetes-pods-app-kubernetes-io-name
    pipeline_stages:
      - cri: {}
    kubernetes_sd_configs:
      - role: pod
    relabel_configs:
      - action: drop
        regex: redash
        source_labels:
          - __meta_kubernetes_pod_name
# [ ... ]

# Case 2
#  [ ... ]
      - action: drop
        regex: redash
        source_labels:
          - __meta_kubernetes_pod_container_name
# [ ... ]

# Case 3
#  [ ... ]
      - action: drop
        regex: redash.*
        source_labels:
          - __service__
or 
          - __host__
or
          - __service__
# [ ... ]

# Case 4
#  [ ... ]
      - action: drop
        regex: redash.*
        source_labels:
          - __meta_kubernetes_namespace
# [ ... ]

# Case 5
#  [ ... ]
      - action: drop
        regex: redash.*
        source_labels:
          - app
or
          - pod
or
          - container
# [ ... ]

I have tried various things other than these.
However, the results were not good, so it seems meaningless.
Is there any way?

Even referring to the site below, I don’t know how.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.