I have multiple java application running inside the container and all of them is managed by kubernetes.
I am using prometheus to monitor cotainer level metrics i.e cpu, mem, etc.
Now I want to do applciation level monitoring using jmx_exporter. but with every deploy container IP keep changing.
can I some how use kuberentes service-ip(cluster-ip) which don't change.
I cannot just directly put kube-service ip as it load-balance it among containers. and every time i will get only one contaienr metrics insted of all.
or is there a way to dynamically discover cotainer with service_name or replication_controller name in prometheus.
Yes, you can scrape pods in kubernetes.
You can find an example of how to do that here