https://blog.csdn.net/xiaoyu_BD/article/details/81698882

#文件替换
docker cp x-pack-core-6.5.4.jar es01:/usr/share/elasticsearch/modules/x-pack-core/x-pack-core-6.5.4.jar
docker cp x-pack-core-6.5.4.jar es02:/usr/share/elasticsearch/modules/x-pack-core/x-pack-core-6.5.4.jar
#集群重启
sudo docker restart es01 es02
#使证书生效(ca验证)
curl --cacert certs/ca/ca.crt -u elastic:oxbjtj4XbN3CwCdiJeXW -H "Content-Type: application/json" -XPUT 'https://localhost:9200/_xpack/license?acknowledge=true' -d @license.json