TLS certificates
TLS certificate can be added in two ways:
- Manually managed certificates
- Automatically managed certificates with Let's Encrypt
Manually managed certificates
To enable HTTPS and HTTPS redirection, but manage your own certificate, add the following flag to opctl init
:
Automatically managed certificates
To enable HTTPS and HTTPS redirection and enable automated certificate manage through Let's Encrypt, add the following flags to opctl init
:
Supported DNS providers
AzureDNS
The flag is azuredns
, as in
note
This guide has been adapted from the cert-manager docs
This guide assumes you have azure-cli
installed.
First set some variables for your project
Then run,
Look at the output, it should be something like this.
You will also need the id from
Here's how the params.yaml
portion connects to the above keys and variables.
Cloudflare
The flag is cloudflare
, as in
note
This guide has been adapted from the cert-manager docs
Currently only API Tokens are supported.
To create an API Token, login to your CloudFlare account and go to User Profile > API Tokens > API Tokens.
The following settings are recommended:
- Permissions:
- Zone - DNS - Edit
- Zone - Zone - Read
- Zone Resources:
- Include - All Zones
Once you create your token, copy it.
Here's how the params.yaml
should look with the above token.
note
If your token has an non-alphanumerical character, surround the token with single quotes.
Google CloudDNS
The flag is clouddns
, as in
note
This guide has been adapted from the cert-manager docs
This guide assumes you have gcloud
installed and set to the correct project and zone.
First set your project id so we can easily reference it
Create service account
Then,
Get credentials
Create the dns01-solver
service account if you have not already.
Now, we get the credential data we need.
This command will save the credentials into key.json
.
Open up that file and copy its contents.
Paste them into your params.yaml
, so you should have something like this
Route53
The flag is route53
, as in
note
This guide has been adapted from the cert-manager docs
note
This guide assumes you have a hosted zone set up in Route53.
Set up a IAM Role
In order to solve the DNS01 challenge, cert-manager needs permissions to add records to Route53.
Create a IAM policy with the following permissions:
Credentials
You have two options for the set up - either create a user or a role and attach that policy from above. Using a role is considered best practice because you do not have to store permanent credentials in a secret.
We currently only support providing an accessKeyID and secretAccessKey for credentials.
Cross Account Access
Example: Account A manages a Route53 DNS Zone. Now you want account X to be able to manage records in that zone.
First, create a role with the policy above (let’s call the role dns-manager) and attach a trust relationship like the one below. Make sure role cert-manager in account X exists:
This allows the role cert-manager in account X to manage the Route53 DNS Zone in account A.
Resulting Yaml
Finally, with everything setup as above, you can configure your yaml as follows,