I have a spring boot application running inside a docker container. This application communicates with another server which hosts Elasticsearch on it. How do I secure the communication between these two entities in my architecture?
You need to set up TLS support on the Elastic Search cluster, which is well documented by the vendor: https://www.elastic.co/guide/en/elastic-stack-overview/current/ssl-tls.html
Then you need to re-configure all method(s) your application uses in your docker container to connect to the TLS secured end-points in your Elastic Search cluster. For instance replace