New to Voyager? Please start here.

Configuring external DNS servers

external-dns project can be used to configure external DNS servers for Voyager managed ingresses.

LoadBalancer Ingress

For a LoadBalancer type Ingress, apply "external-dns.alpha.kubernetes.io/hostname" annotation on the service that exposes HAProxy pods. This service should have a name like voyager-{ingress-name} in the same namespace of the Ingress object. Since, Voyager uses its own CRD for Ingress, external-dns project must use the service to discover loadbalancer ip.

apiVersion: voyager.appscode.com/v1
kind: Ingress
metadata:
  name: test-ingress-voyager
  namespace: vdimov-dev
  annotations:
     ingress.appscode.com/annotations-service: |
         {
           "external-dns.alpha.kubernetes.io/hostname" : "voyager.example.com,voyager-1.example.com,voyager-2.example.com"
         }         
     ingress.appscode.com/replicas: '2'
spec:
  rules:
  - host: voyager.example.com
    http:
      paths:
       - backend:
          service:
            name: web
            port:
              number: 80

NodePort Ingress

Since v0.5.3, external-dns supports NodePort ingress.

HostPort Ingress

HostPort type Ingress is supported by external-dns. Here, apply "external-dns.alpha.kubernetes.io/hostname" annotation on the HAProxy services.

apiVersion: voyager.appscode.com/v1
kind: Ingress
metadata:
  name: test-ingress-voyager
  namespace: vdimov-dev
  annotations:
     ingress.appscode.com/type: HostPort
     ingress.appscode.com/annotations-service: |
         {
           "external-dns.alpha.kubernetes.io/hostname" : "voyager.example.com,voyager-1.example.com,voyager-2.example.com"
         }         
     ingress.appscode.com/replicas: '2'
spec:
  rules:
  - host: voyager.example.com
    http:
      paths:
       - backend:
          service:
            name: web
            port:
              number: 80

Internal Ingress

Internal ingress is not accessible from outside a cluster. Hence, there is nothing to configure in external DNS servers.