-
Notifications
You must be signed in to change notification settings - Fork 0
Domain Setup
Tim-Smans edited this page May 23, 2025
·
1 revision
This page explains how to connect your custom domain (e.g., tracker.mydomain.com) to the external IP address of your Kubernetes Ingress LoadBalancer. This makes your backend or frontend accessible over the internet using a friendly URL.
- A registered domain name (e.g., from Namecheap, OVH, Google Domains, etc.).
- Access to your domain's DNS settings.
- The external IP address of your Kubernetes Ingress (typically on GKE).
- An Ingress controller (e.g., NGINX or GKE default).
Run this command to retrieve the external IP of your Ingress resource:
kubectl get svc -n ingress-nginxExample output:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
nginx-ingress-ingress-nginx-controller LoadBalancer 10.52.10.238 34.88.154.35 80:30274/TCP,443:31253/TCP 9d
nginx-ingress-ingress-nginx-controller-admission ClusterIP 10.52.5.44 <none> 443/TCP 9d
Copy the IP address, for example: 34.88.154.35
- Log into your domain provider's dashboard.
- Go to DNS settings for your domain.
- Add a new A record like this:
| Type | Name (Host) | Value (IP) | TTL |
|---|---|---|---|
| A | tracker |
34.88.154.35 |
Default |
This will point
tracker.mydomain.comto your Ingress IP.
If you want to point the root domain (e.g., mydomain.com), set the Name/Host field to @.
Make sure your Kubernetes Ingress YAML (In Terraform) includes the domain:
spec:
rules:
- host: tracker.mydomain.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: your-service-name
port:
number: 80Then make sure you apply the terraform update.
terraform apply