DNS search suffixes for non-internal services

It seems from the documentation and some experimentation that the DNS shortcuts for peer services, e.g. auth.myapp.convox.local, auth.myapp, auth are only set if the service is internal: true.

Is this true, and if so, is there a reason it applies only to internal services? It seems like a common use case to have a service that is used both internally and externally, and that internal traffic could stay within the VPC.

1 Like

Hi @julian, sorry to post on a very old thread, but did you ever figure this out? I really need this as well - a web service that needs to be publically available and also accessed through an internal load balancer from the VPC.

Hey @nathan.f77

For this you can simply use the k8s domain.

<service-name>.<namespace>.svc.cluster.local

mapped to Convox this would be:
<convox-service-name>.<rackName-appName>.svc.cluster.local



e.g. for this basic nodejs app:

environment:
  - PORT=3000
services:
  web:
    domain: ${HOST}
    build: .
    port: 3000



You can exec into a secondary application and access the web service:

convox exec web sh -a nodejs-2 -r test-22425

/usr/src/app#  curl web.test-22425-nodejs.svc.cluster.local:3000
Hello Convox!
I'm: nodejs
Build:BGXJJNPGXPE
Release: RVWFOWVCWJH
running on: test-22425

I hope this helps.

1 Like