You could use pod name by setting the pod name as environment variable and accessing it on Spring configuration class