Custom domains with TLS
Add custom domains to your ML endpoints with HTTPS
Tensorkube enables you to attach custom domains to your deployments and secure them with HTTPS using AWS Certificate Manager (ACM). Follow the steps below to configure your custom domain with TLS.
Overview
Setting up custom domains with TLS involves three main steps:
- Configuring a domain with AWS ACM.
- Adding the required DNS records to your domain name service.
- Attaching the configured domain to your deployment in Tensorkube.
Step 1: Configure Domain with AWS ACM
Run the following command to provision a wildcard SSL certificate for your domain using AWS ACM:
This will set up a wildcard certificate for *.sub.example.org. You will receive a set of CNAME records that you need to add to your domain name service to validate your domain. This enables you to
use all the subdomains under *.sub.example.org
for your deployments. service.sub.example.org
will be a valid example for your deployment.
Step 2: Add DNS Records
Once you run the above command, you will see a table of DNS records that need to be configured in your DNS provider (e.g., Cloudflare). Here’s an example of what the output might look like:
Make sure to add these DNS records to your domain registrar. If you’re using a service like Cloudflare, ensure that the proxy option is turned off to allow proper DNS resolution.
DNS Validation
To retrieve the required DNS records in case you need them later, use:
Step 3: Attach Domain to Cluster
After setting up your DNS records, you need to connect your domain to the ACM certificate for TLS termination. Run:
This step binds your load balancer to the ACM certificate, enabling HTTPS for connections.
Deploy with Custom Domain
Finally, to deploy your application with the configured domain:
By specifying —domain-name, you instruct Tensorkube to use the custom domain for your deployment. This also replaces the default subpath URL access with the specified subdomain, providing a cleaner, more professional endpoint secured with HTTPS.
Notes
- Make sure your DNS changes are propagated. This can take some time, depending on your DNS provider.
- Cloudflare users: Ensure the DNS records use “DNS Only” mode instead of “Proxied” to prevent any conflicts during verification. By following these steps, you’ll successfully set up a custom domain with HTTPS for your Tensorkube deployments, enhancing security and branding for your applications.