Using a custom TLS certificate for DomainMapping
- beta features are well-tested and enabling them is considered safe. Support for the overall feature will not be dropped, though details may change in incompatible ways.
By providing the reference to an existing TLS Certificate you can instruct a to use that certificate to secure the mapped service. Using this feature skips autoTLS certificate creation.
- You have followed the steps from Configuring custom domains and now have a working
DomainMapping
.
Procedure
Assuming you have obtained the
cert
andkey
files from your Certificate Authority provider or self-signed, create a plain Kubernetes TLS Secret by running the command:Use kubectl to create the secret:
Update your YAML file to use the newly created secret as follows:
Where:
<tls-secret-name>
is the name of the TLS secret created in the previous step.<domain-name>
is the domain name that you want to map a Service to.<service-name>
is the name of the Service that will be mapped to the domain.
Verify the
DomainMapping
status:-
The
URL
column of the status should show the mapped domain with the scheme updated tohttps
: If the Service is exposed publicly, verify that it is available by running:
If the certificate is self-signed skip verification by adding the flag to the curl command.
-