Skip to content

Configuring PublicDomain and ExternalService


Rio allows you to add a vanity domain, such as, to your workloads.

For example:

  • If you enabled rdns feature, Setup a CNAME record from your domain to the Rio cluster domain. You should be able to see the cluster domain when running rio info. -----> CNAME ------->

  • If you disabled rdns feature, you won't be able to get domain. Instead, create A record to IP of API gateway

    Get the ip of the service loadbalancer that points to API gateway

 kubectl get svc gateway-proxy -n rio-system  -o jsonpath='{.status.loadBalancer.ingress[0].ip}'

Create DNS record -----> A -------> IP

Register the domain in rio

# Register a target service with the domain
$ rio domain register $target

# Access your domain 
$ rio endpoint

You can provide your own certificates instead of using letsencrypt. To create a secret that contains your tls.crt and tls.key:

kubectl -n rio-system create secret tls --cert=/path/to/your.cert --key=/path/to/your.key

Register domain with secret you just created

$ rio domain register --secret $target

In the above example, $target can be a service(app@version), a group of services(app) or a router(router)

For example, to register a domain with app demo and version v1:

$ rio domain register demo@v1

To register a domain with app demo:

$ rio domain register demo

To register a domain with router prod:

$ rio domain register router/prod

To unregister a domain:

$ rio domain unregister publicdomain/ 


ExternalService is a service such as a database or legacy app outside of your cluster. ExternalService can be specified with an IP addresses, FQDN, or a Rio service in another namespace. Once added, external services can be discovered by short name within the same namespace.

To add externalservice ext pointing to FQDN

$ rio external create ext mydb.address

To add externalservice ext pointing to IP addresses

$ rio external create ext

To add externalservice pointing to app demo and version v1

$ rio external create ext demo@v1

# to change the namespace
$ rio external create ext foo:demo@v1

To add externalservice pointing to app demo

$ rio external create ext demo

To add externalservice pointing to route prod

$ rio external create ext router/prod