How to Read stdout from container with another container in same pod

3/9/2020

I want to read log from container with another container in same pod

i've tried approach that shared volume between two container so i mapping the log file to a shared volume from container 1 and read the log file from container 2 with the same shared volume

but how i can read the stdout directly ? especially in kubernetes and the same pods ?

-- Renaldi Yulvianda
kubernetes
logging
stdout

1 Answer

3/13/2020

You should share process namespace between these two containers and then tail the logs of a process in one container to another.

Read the k8s docs

-- lakshman.pasala
Source: StackOverflow