Provisioning SSL Certificates¶
Automated (certbot) certificates¶
If you have a certbot (Let’s Encrypt) account the OKD Orchestrator can automatically generate SSL certificates for your site. You just need to do the following before creating your cluster: -
Provide your account’s registered email in the
TF_VAR_master_certbot_emailvariable in yoursetenv.shfileSet the configuration file property
okd.certificates.generate_api_certtoyes.
This is convenient and quick. Certbot certificates are nice, and self-signed but they often expire after a few months, needing to be renewed.
User (pre-defined) certificates¶
As an alternative you can provide your own certificates, and you may well have some that are pre-built for the domain you’ll be deploying OKD to. If you have your own certificates you can automatically deploy these with a few simple steps.
In order to deploy your own certificates You should should have: -
Three certificate files.
cert.crt,ca-bandle.crtandprivate.keyThe domain name for the master API/console
As best practice, and to protect them, your certificate files must be encrypted using ansible vault 3.
To deploy your certificates, do the following before deploying your cluster: -
Place your encrypted certificate files into a directory called
certificatesin your deployment configuration directory. For example if your deployment configuration isaws_demothe files would go intodeployments/aws_demo/certificatesSet the configuration file property
okd.certificates.generate_api_certto the SSL domain name for the masterCreate a
vault-pass.txtfile containing the vault password you used to encrypt your certificates and place this in your deployment directory (e.g. indeployments/aws_demo) 4
- 3
Ansible vault is available in the OKD Orchestrator’s container image. The files will be automatically decrypted as they are sent to the Bastion/Master for the OKD installation process.
- 4
You can commit your certificates to revision control as they are encrypted but the
vault-pass.txtfile is the one thing you do not commit. This remains a local file.