Adding TLS Certificates to Your TrueFoundry Deployment
This guide explains how to configure TLS certificates to enable HTTPS access to your TrueFoundry deployments. We’ll cover multiple approaches based on your cloud and DNS provider.- GCP
- Azure
When running TrueFoundry on GCP, you have the following options for TLS termintation
Terminate TLS by using cert-manager with GCP Cloud DNS (recommended)
Terminate TLS by using cert-manager with GCP Cloud DNS (recommended)
For production GCP deployments, we recommend using cert-manager with GCP Cloud DNS. This helps in ensuring that the domain you are using for TrueFoundry’s deployment is separate from your main domain. It also helps in managing the certificates and renewals automatically. If you want to use your own DNS provider with cert-manager, you can follow the instructions here.Add the nameservers from the output to your domain registrar (GoDaddy, Namecheap, etc.) so that this DNS zone is now used for your domain.
Creating the certificate using cert-manager with GCP Cloud DNS
This approach requires workload identity to be enabled on your GKE cluster. For clusters created through OpenTofu/Terraform code generated by TrueFoundry, this is enabled by default.Step 1: Configure GCP Service Account and Permissions
Step 2: Configure DNS for Your Domain
If you already have a DNS zone in GCP, you can skip the step of creating the DNS zone and simply assign the variablesDNS_HOSTED_ZONE and DNS_ZONE_PROJECT_ID with the name of your DNS zone and the project ID respectively.Step 3: Install and Configure cert-manager
From the platform, head over to the Cluster’s page and ensure that you havecert-manager addon installed. Ensure that you are passing the google serviceaccount email to the cert-manager serviceaccount annotations in the values section.Step 4: Create Certificate Issuer and Request Certificate
-
Get your cluster credentials:
-
Create an issuer for Let’s Encrypt.
-
Request a certificate. You can replace the
.metadata.nameof the certificate and the.spec.secretNameaccordingly. Ensure that you have also replaced the.spec.issuerRef.namewith the name of the issuer you created in the previous step and the.spec.dnsNameswith your chosen domain name. Here we are usingexample.comand*.example.comas the domain names. -
Check certificate status:
Step 5: Configure TLS in Your Ingress Gateway
Once the certificate is created, head over to the cluster’s page and navigate to thetfy-istio-ingress addon. Add the secret name in the tfyGateway.spec.servers[1].tls.credentialName section and ensure that tfyGateway.spec.servers[1].port.protocol is set to HTTPS. Here we are using example-com-tls as the secret name which contains the certificate and key.Terminate TLS by using cert-manager with your DNS provider (e.g. Route 53, cloudflare, godaddy, etc.)
Terminate TLS by using cert-manager with your DNS provider (e.g. Route 53, cloudflare, godaddy, etc.)
Other way to handle TLS termination is to use cert-manager with your DNS provider. This is useful if you don’t want to use GCP Cloud DNS.
For this you can follow the instructions here.