Last active
May 30, 2022 14:53
-
-
Save jalogisch/f4e833378b6148ea6561f75302e19e5e to your computer and use it in GitHub Desktop.
create custom self signed ECE certificates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ELASTICSEARCH_IMG=docker.elastic.co/elasticsearch/elasticsearch:7.8.0 | |
export DOMAIN="ece.internal" | |
docker run --rm -v "$(pwd)":/tmp/certs -w /tmp/certs $ELASTICSEARCH_IMG /usr/share/elasticsearch/bin/elasticsearch-certutil ca \ | |
--pem \ | |
--out /tmp/certs/ca.zip | |
unzip ca.zip | |
docker run --rm -v "$(pwd)":/tmp/certs -w /tmp/certs $ELASTICSEARCH_IMG /usr/share/elasticsearch/bin/elasticsearch-certutil cert \ | |
--pem \ | |
--name server \ | |
--dns "${DOMAIN},*.${DOMAIN}" \ | |
--out /tmp/certs/server.zip \ | |
--ca-cert /tmp/certs/ca/ca.crt \ | |
--ca-key /tmp/certs/ca/ca.key | |
unzip server.zip | |
cat server/server.key server/server.crt ca/ca.crt > ece.cert.bundle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment