🔍 Background:
For updating Elasticsearch to versions 17.10 and 17.5 with a P12 certificate, you can follow the steps outlined below.
Steps:
- Access Docker Container:
docker exec -it {container_name} bash
- Generate CA Certificate:
/usr/share/elasticsearch/bin/elasticsearch-certutil ca
- Enter a file name for the CA certificate in P12 format (e.g., New_Cer.p12)
- Specify the cipher for SSL encryption.
- Sign the new Certificate:
/usr/share/elasticsearch/bin/elasticsearch-certutil cert --ca {First_created_file}.p12 --ca-pass "" --days {Date_Of_Expiration} --out "{Output_name}.p12" --pass ""
- Replace SSL Certificate:
rm -rf /usr/share/elasticsearch/config/cert/elastic-stack-ca.p12
mv {Location_Of_Created_File} /usr/share/elasticsearch/config/cert/elastic-stack-ca.p12
- Update File Permissions:
sudo chown {Username}:{Group} /usr/share/elasticsearch/config/cert/elastic-stack-ca.p12
- Check SSL Validation:
- Dev Tool in Kibana:
GET /_ssl/certificates
- Check SSL Expiry Date:
curl -X GET http://{IP_Address}:9200/_ssl/certificates -u {Username}:{Password} | jq '.[-1].expiry' | cut -d '"' -f 2
🚀 Completion:
By following these steps, you would have successfully updated Elasticsearch to the specified versions and configured it with a P12 certificate for secure communication.
Good luck with your Elasticsearch update! 🎉
Top comments (0)