I have a SpringBoot application, dockerized, and deployed in a kubernetes cluster. There is any way to log the pod name and pod ip from the springboot application inside the container?
Thanks in advance.
One approach is to run a Fluentd agent on each cluster node. The agent collects all pod sysouts, decorates the logs with pod attributes and pipes them into ElasticSearch or some other searchable store. ala kubernetes-fluentd
You should be using downwardAPI to capture pod name and pod ip as environment variables inside container