Howto Install SSL Certificates to your Openshift route
Assumptions
- You have OpenShift 3.9 or above
- You are using Openshift on Centos 7
- You have shell access and able to install software.
- You have access to your DNS to add a TXT record
Obtain SSL certificat from LetsEncrypt
- Install certbot using the instructions here: https://certbot.eff.org/lets-encrypt/centosrhel7-other
- Define the shell variable ROUTE_URL whose value is the url of your route.
- Execute the command below where you should have defined YOUR_WILDCARD_DOMAIN beforehand.
sudo certbot --server https://acme-v02.api.letsencrypt.org/directory -d $ROUTE_URL --manual --preferred-challenges dns-01 certonly
- You will be asked to insert a txt record into your DNS. After inserting, verify that you are able to resolve the TXT record.
dig -t txt _acme-challenge.$ROUTE_URL
It should give you something like the below:
;; ANSWER SECTION:
_acme-challenge.$ROUTE_URL. 599 IN TXT "--1YDlFE4K73i9cjHN5de6e-D8yhmOqaj6yIRcpZ_BU"
Written on
November
22nd
,
2018
by
Bobby Corpus
Feel free to share!