I have a promtail deployed to K8s using Helm and need it to read logs from a volume which gets mounded to a Vault container(within a pod).
The volume path on the node is: /var/lib/kubelet/pods/0b7ecd80-b32c-4467-be65-d70c77c99400/volumes/kubernetes.io~nfs/pvc-73c53294-3a2b-4633-8195-1dbaa51e0b0f
Which i know i could generate a path with /var/lib/kubelet/pods/1/volumes/kubernetes.io~nfs/*/*.log using regex ([^_]*) … however i am lost as to how to implement this in the scrape_config.
Do I use kubernetes_sd_config and if so how do I set the path?
Or do I use static_config, and if so is there a way to set the labels to they match the pods the logs have come from?
Thanks for any help