Custom Domains API

Attach custom domains to your apps. Uncloud configures Ingress rules and TLS certificates automatically.

List Domains

GET /api/v1/apps/{id}/domains
Response:
[
  {
    "domain": "api.example.com",
    "app_id": "app_a1b2c3d4",
    "tls_enabled": true,
    "created_at": "2024-01-15T10:30:00Z"
  }
]

Add a Domain

POST /api/v1/apps/{id}/domains
domain
string
required
The custom domain (e.g., api.example.com)
{
  "domain": "api.example.com"
}
Response: 201 Created
After adding a domain, create a CNAME or A record pointing to your Uncloud cluster’s load balancer IP.

Remove a Domain

DELETE /api/v1/apps/{id}/domains/{domain}
Removes the domain from the app’s Ingress configuration.

TLS / SSL

When a custom domain is added, Uncloud can automatically provision a TLS certificate via cert-manager and Let’s Encrypt. This requires:
  1. cert_manager_cluster_issuer configured in config.yaml
  2. DNS pointing to your cluster
  3. Port 80 and 443 accessible from the internet

Default Subdomain

Every app automatically gets a subdomain based on the configured base_domain:
<app-slug>.<base-domain>
Example: App “my-api” with base domain go4.sitemy-api.go4.site This subdomain uses the wildcard TLS certificate specified in default_tls_secret_name.

DNS Configuration

Record TypeNameValue
CNAMEapi.example.comyour-cluster.go4.site
Aapi.example.com<cluster-load-balancer-ip>